Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <pre>
- YOUR INFO ----
- HTTP_USER_AGENT => <? print getenv("HTTP_USER_AGENT") . "\n"; ?>
- HTTP_CLIENT_IP => <? print getenv("HTTP_CLIENT_IP") . "\n"; ?>
- HTTP_X_FORWARDED_FOR => <?print getenv("HTTP_X_FORWARDED_FOR") . "\n"; ?>
- SERVER HTTP_X_FORWARDED_FOR => <? print $_SERVER['HTTP_X_FORWARDED_FOR'] . "\n"; ?>
- REMOTE_ADDR: => <? print getenv("REMOTE_ADDR") . "\n"; ?>
- SERVER REMOTE_ADDR => <? print $_SERVER['REMOTE_ADDR'] . "\n"; ?>
- SERVER_VARS => <? print $HTTP_SERVER_VARS ['REMOTE_ADDR'] . "\n"; ?>
- HTTP_X_FORWARDED => <? print getenv("HTTP_X_FORWARDED") . "\n"; ?>
- SERVER HTTP_X_FORWARDED => <? print $_SERVER['HTTP_X_FORWARDED'] . "\n"; ?>
- HTTP_FORWARDED => <? print getenv("HTTP_FORWARDED") . "\n"; ?>
- SERVER HTTP_FORWARDED => <? print $_SERVER['HTTP_FORWARDED'] . "\n"; ?>
- HTTP_VIA => <? print getenv("HTTP_VIA") . "\n"; ?>
- SERVER HTTP_VIA => <? print $_SERVER['HTTP_VIA'] . "\n"; ?>
- HTTP_PROXY_CONNECTION => <? print getenv("HTTP_PROXY_CONNECTION") . "\n"; ?>
- SERVER HTTP_PROXY_CONNECTION => <? print $_SERVER['HTTP_PROXY_CONNECTION'] . "\n"; ?>
- <?php
- //Find the IP of the visitor
- if (getenv("HTTP_CLIENT_IP") && strcasecmp(getenv("HTTP_CLIENT_IP"), "unknown"))
- {
- $rip = getenv("HTTP_CLIENT_IP");
- }
- else if (getenv("HTTP_X_FORWARDED_FOR") && strcasecmp(getenv("HTTP_X_FORWARDED_FOR"), "unknown"))
- {
- $rip = getenv("HTTP_X_FORWARDED_FOR");
- }
- else if (getenv("REMOTE_ADDR") && strcasecmp(getenv("REMOTE_ADDR"), "unknown"))
- {
- $rip = getenv("REMOTE_ADDR");
- }
- else if (isset($_SERVER['REMOTE_ADDR']) && $_SERVER['REMOTE_ADDR'] && strcasecmp($_SERVER['REMOTE_ADDR'], "unknown"))
- {
- $rip = $_SERVER['REMOTE_ADDR'];
- }
- else
- {
- $rip = "unknown";
- }
- //Display the IP of the Visitor
- echo "Your IP is $rip";
- ?>
- </pre>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement