PDA

View Full Version : Recording IP Add



learning
28-02-2008, 07:07 PM
Is there someway to record the IP address of a visitor to your profile/blog?

For e.g if u have a profile on myspace or any site where u put profile then someone comes to visit can you have like a HTML script embedded in your profile to record the IP address and record it somewhere ?

Erayd
28-02-2008, 07:56 PM
Yep - use PHP, and save the contents of $_SERVER['REMOTE_ADDR'] to your log somewhere. Alternatively just look at the logs for your hosting provider - most decent providers will give you log access, and log visitor IPs.

Note that you can't do this on sites such as MySpace etc, you need the ability to run custom scripts on the server.

somebody
28-02-2008, 08:02 PM
You can probably do it with an embeded image, which is hosted elsewhere.

Erayd
28-02-2008, 09:52 PM
You can probably do it with an embeded image, which is hosted elsewhere.Are you sure? I'm pretty certain that you can't use raw HTML on these sites (although I admit I could be wrong), which means you can't hotlink images, and therefore can't trigger such a script on another site.