Jump to content

php proxy detect


birdie

Recommended Posts

Please indicate why you say that?

That has nothing to do with what version of PHP you're using. That gets populated if it's in the HTTP header request.

Assuming a non-anonymous proxy is used, the HTTP_X_FORWARDED_FOR header contains the IP address of the user. In the event a user is going through multiple proxies, the HTTP_X_FORWARDED_FOR header might contain multiple addresses separated by commas. The last address in the list is the original address of the user.

None of that will be accurate 100% of the time. There is no full proof way to get a user's IP address because of various reasons. Any proxy along the way might not pass on the IP address, or users can specify the HTTP_X_FORWARDED_FOR themselves. Anonymous (real anonymous!) proxy servers don't transfer the information about the IP-address of the user.

Note: You must validate the HTTP_X_FORWARDED_FOR field or it could result in XSS (cross-site scripting) or SQL injection attack, depending on how you use it.

Link to comment
https://forums.phpfreaks.com/topic/9623-php-proxy-detect/#findComment-35575
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.