November 28th, 2006

How to retrieve a visitor's IP address

Every visitor to your site or web application has an IP address. It is quite handy to be able to get that address. It can be used for security logging, or perhaps tracing. It can also be used to determine where they are in the world, or at least where their ISP is.

The difficulty is when they're behind a proxy of some sort, you only see the IP address of the proxy server. So, here are the code snippets in PHP, ASP and .Net that first check for an IP addresses that's forwarded from behind a proxy, and if there's none then just get the IP address.
(more…)

November 27th, 2006

Enable PHP 5 on HostGator hosted servers!

Today I downloaded an Open Source PHP web application for project management. One of the system requirements was PHP 5. I checked in cPanel, and was pained to see that Hostgator is only running PHP version 4.4.4.

I've known Hostgator to be very up-to-date with their hosting technology, so I searched the knowledgebase to see if I could find any plans or information on upgrading to PHP 5. There was nothing.

So I contacted support and asked them. I found out that PHP 5 is already installed, but you have to enable it for the web application you'd like to use it on. To do this, you'd modify the .htaccess file, and add this line:

AddHandler application/x-httpd-php5 .php

The installed PHP version is actually 5.1.5. I'm not sure why they don't just enable it server-wide, perhaps it has something to do with backwards-compatibility. I haven't tried to enable it across my account, but I have a feeling that you'd be able to in 'MIME Types' in cPanel.

November 27th, 2006

Play BMX Stunts Online!

In this flash BMX biking game, you ride your bike outside, pick up speed and do stunts to see if you can get the highest score!
Post your score in the comments field below! (more…)

November 26th, 2006

Adopt an alien

This post is sponsored by PayPerPost (more…)

November 24th, 2006

Play Reversi Online for free!

This is a flash version of Reversi, enjoy!
Post your score in the comments field below! (more…)

« Previous PageNext Page »