Login Register


How To Grab IP Address With PHP filter_list
Author
Message
RE: How To Grab IP Address With PHP #11
Thanks for sharing... Well done !
redN00ws
Cleveridge - Ethical Hacking Lab

I'm looking for freelance vulnerability testers. Interested? Contact me...

Reply

RE: How To Grab IP Address With PHP #12
No problem!
(02-15-2012, 08:52 PM)Woody Wrote: The more you look, the more you find. The more you find, the more you look.

Reply

RE: How To Grab IP Address With PHP #13
In countries like Singapore where a nation-wide proxy is established, such IP detectors provicde only the proxy IP address of a fake one.

The IP script will have to be inside the country's IP space for it to be visible as well.

The following is an ip.php script to obtain such info.

Code:
<? echo getip(); function getip() { if (isset($_SERVER["HTTP_CLIENT_IP"]) && validip($_SERVER["HTTP_CLIENT_IP"])) { return $_SERVER["HTTP_CLIENT_IP"]; } if (isset($_SERVER["HTTP_X_FORWARDED_FOR"])) { foreach (explode(",",$_SERVER["HTTP_X_FORWARDED_FOR"]) as $ip) { if (validip(trim($ip))) { return $ip; } } } if (isset($_SERVER["HTTP_X_FORWARDED_FOR"]) && validip($_SERVER["HTTP_X_FORWARDED_FOR"])) { return $_SERVER["HTTP_X_FORWARDED_FOR"]; } elseif (isset($_SERVER["HTTP_FORWARDED_FOR"]) && validip($_SERVER["HTTP_FORWARDED_FOR"])) { return $_SERVER["HTTP_FORWARDED_FOR"]; } elseif (isset($_SERVER["HTTP_FORWARDED"]) && validip($_SERVER["HTTP_FORWARDED"])) { return $_SERVER["HTTP_FORWARDED"]; } elseif (isset($_SERVER["HTTP_X_FORWARDED"]) && validip($_SERVER["HTTP_X_FORWARDED"])) { return $_SERVER["HTTP_X_FORWARDED"]; } else { return $_SERVER["REMOTE_ADDR"]; } } ?>

Reply

RE: How To Grab IP Address With PHP #14
I have used a script like this from a site that gets alot of traffic and then turn around and used the ipaddress as spoof for fake traffic on other sites. Great little Script!!

Reply







Users browsing this thread: 1 Guest(s)