Posts Tagged ‘php’

Today I need to add suffix to my css codes. Unfortunately I’m too lazy to do this repeated task again and again. With PHPDesigner, I tried to automate this task and with a little knowledge of regular expression now the problem is solved.

A quick explanation of regex that I use:

^\.([a-zA-Z\-]*)
- ^\. search for string start with .
- (…) capture the content inside with scope
- [a-zA-Z\-] only contain a-z, A-Z, and -
- * repeat the search condition [a-zA-Z\-] for next characters

\.$1_red
- \. write .
- $1 write matched string in the scope
- _red write _red

Find and replace regular expression

Google Trend

This morning I was so excited to start mining google trend. If you are new with Google Trend, it will show keywords that are recently getting popular. You will get 100 top popular keywords. This keyword list is updated every hour.

I’m planning to populate them, mining the data in order to get the ‘hot’ and long term profitable keyword that I can use to build adsense websites.

I will show you how to do this with a simple PHP script.
Read the rest of this entry »

One of my client request an improvement of his current website. He want an uploaded image could be resized automatically so his users no longer bothered with image size problem.

From google result, I found a ready made function for this purpose. In this tutorial I show you how to use this great function for you project.

Read the rest of this entry »

Ajax 503 error

Ajax 503 error

Today I got a problem when working with client website that is hosted with dreamhost.com. There is an Ajax function that did not work as it should do. With the help of firebug I’m able to see that this Ajax is trying to POST data and somehow the server reject its request then return 503 error.

Read the rest of this entry »