PHP

How to make sure your server can generate images

This small article will explain how you create a thumbnail from an image in PHP. Furthermore you learn how to batch process a whole folder of images and create their thumbnails.

To create images with PHP you need to have the gd image library installed and activated in your PHP.

To make sure if gd is installed on your machine, simply check your php info. Create a file that contains:

<?phpinfo()?>

and save it as "test.php" on your server. When you open it in a browser you see a colourful table showing all the schematics of your PHP install. In it you have to find something like this: Example of a php with gd installed

If you know for sure that there is gd on the machine but PHP does not recognise it, it may still be commented in the php.ini.

http://www.hostip.info/

Below is a posting from StumbleUpon: http://subesh.com.np/2008/07/mapping-the-ip-address-to-latitude-and-longitude-in-google-maps/ 

At last I found hostip.info provides a service for getting the latitude and longitude of a place on the basis of the user’s ip address. Its light weight and free, rather than downloading bulky database and getting paid services, for getting latitude and longitude on the basis of IP.
Here is the simplest way to do it. Requested to http://api.hostip.info/?ip=$ip&position=true it responds XML formatted output. So we need to parse XML code using DOM class of PHP.(#19-#23). Remember, the position=true should be set to get the latitude and longitude otherwise it will not show on default.