PDA

View Full Version : Need some script on IP sites.


Mindelude
12-21-2006, 01:24 AM
Hello, I want to create a site on IP address.. or somecall it "proxy site".

1)Can anyone please provide me with an IP address script that simply will say "Your IP Address is:---------"

2)also, another feature that would be nice is an option that allows people to surf the web anonymously. (I've seen it on many sites. They surf the web using different IP address?)

If you can provide me those 2 script/code, Thanks SO Much.

Mindelude
12-23-2006, 02:27 AM
I still need help :p :(

thanks.

tribalmaniac
12-24-2006, 04:16 PM
I can help you with your first query:


<?php
if (getenv('HTTP_CLIENT_IP')) {
$ip = getenv('HTTP_CLIENT_IP');
}
elseif (getenv('HTTP_X_FORWARDED_FOR')) {
$ip = getenv('HTTP_X_FORWARDED_FOR');
}
elseif (getenv('HTTP_X_FORWARDED')) {
$ip = getenv('HTTP_X_FORWARDED');
}
elseif (getenv('HTTP_FORWARDED_FOR')) {
$ip = getenv('HTTP_FORWARDED_FOR');
}
elseif (getenv('HTTP_FORWARDED')) {
$ip = getenv('HTTP_FORWARDED');
}
else {
$ip = $_SERVER['REMOTE_ADDR'];
}

echo("you're IP address is: ".$ip);

?>