This is a discussion on How to track IPs of clients while requesting page within the PHP Programming forums, part of the Web Development category; I need to implement the IP tracking feature in a project. While tracking the client IP I found an issue. ...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
| |||
| I need to implement the IP tracking feature in a project. While tracking the client IP I found an issue. The issue is, while the the page is being hit by a system its actual IP is cannot be traced (Incase a server hits the page). Instead of actual IP some internal IP is traced. (e.g. 192.168.X.XXX like that) I used $_SERVER['HTTP_X_FORWARDED_FOR'] $_SERVER['REMOTE_ADDR'] But it works only the client is an individual sys. If a server hits the page means only its internal IP is traced. Guys any idea???????????????????????????????? |
| Sponsored Links |
| |||
| Hi, Here is PHP code: <html> <head> <title>What is my IP address?</title> </head> <body> <?php if (getenv(HTTP_X_FORWARDED_FOR)) { $pipaddress = getenv(HTTP_X_FORWARDED_FOR); $ipaddress = getenv(REMOTE_ADDR); echo “Your Proxy IPaddress is : “.$pipaddress. “(via $ipaddress)” ; } else { $ipaddress = getenv(REMOTE_ADDR); echo “Your IP address is : $ipaddress”; } ?> </body> </html> Thanks sivarman. |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Interactions with clients - Useful tips | amansundar | The Lounge | 23 | 05-01-2008 02:27 PM |
| 'Page' ia an unambiguous reference between 'System.Web.UI.Page' and 'Project1.Page' | poornima | ASP and ASP.NET Programming | 1 | 03-05-2008 03:12 AM |
| How do you track your website visitors? | montyauto | PHP Programming | 3 | 09-11-2007 03:25 AM |
| Track the mobile user | prasath | Mobile Software Development | 0 | 07-16-2007 05:54 AM |
| How can track click? | webmaster | Search Engine Optimization | 1 | 02-20-2007 04:05 AM |