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 |
|
#1
| |||
| |||
| 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???????????????????????????????? |
|
#2
| |||
| |||
| 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. |
|
#3
| |||
| |||
| I told that i already used those variables. Would be better if you suggest me other methods. |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| What SEO Clients want? | sanilbd | Search Engine Optimization | 2 | 09-25-2009 11:51 PM |
| Create VPN autocatically on clients | shaalini | Operating Systems | 6 | 08-11-2009 02:28 PM |
| Interactions with clients - Useful tips | amansundar | The Lounge | 23 | 05-01-2008 01: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 02:12 AM |
| How can track click? | webmaster | Search Engine Optimization | 1 | 02-20-2007 03:05 AM |
Our Partners |