Tasc0 Posted December 4, 2006 Share Posted December 4, 2006 Hi, well.. I've used this site a lot thanks to Google but now I'd like to do something in a web site but I can't find it or eiter understand it very well.My question is: Can I detect if a user from a web site is using a proxy and if he is, don't let him enter the site?I've found some stuff about it but I can't understand it very well. Here they are:/http://www.phpbuddy.com/article.php?id=22/http://joot.com/dave/writings/articles/php-examples.shtmlI'd aprecciate any reply.Thanks in advance. Quote Link to comment Share on other sites More sharing options...
papaface Posted December 4, 2006 Share Posted December 4, 2006 Ignore this post. Suggested code does not work. I will keep trying :) Quote Link to comment Share on other sites More sharing options...
Tasc0 Posted December 4, 2006 Author Share Posted December 4, 2006 Yeah, I tested those out and didn't work. Quote Link to comment Share on other sites More sharing options...
papaface Posted December 4, 2006 Share Posted December 4, 2006 To be honest. I'm not sure that there is a way anymore of doing this. I think the proxy scripts out there have been updated to work around any detection that a website may have... Quote Link to comment Share on other sites More sharing options...
Tasc0 Posted December 4, 2006 Author Share Posted December 4, 2006 I'm not talking about the proxy script such as anonymouse.org. Quote Link to comment Share on other sites More sharing options...
mainewoods Posted December 5, 2006 Share Posted December 5, 2006 aol users are all proxied--try printing out headers recieved from proxy sites and non proxy sites[code]print_r($_SERVER);[/code]--if there is anything you can use, it would be there Quote Link to comment Share on other sites More sharing options...
Tasc0 Posted December 5, 2006 Author Share Posted December 5, 2006 [quote author=mainewoods link=topic=117312.msg478868#msg478868 date=1165283948]aol users are all proxied--try printing out headers recieved from proxy sites and non proxy sites[code]print_r($_SERVER);[/code]--if there is anything you can use, it would be there[/quote]I have this in a file:[code]<?print_r($_SERVER);?>[/code]And this is what I get on my browser:print_r($_SERVER);ER); ?>Is that what you meant? Quote Link to comment Share on other sites More sharing options...
mainewoods Posted December 5, 2006 Share Posted December 5, 2006 no that should be printing out a bunch of variables like host, referer, user-agent, ect. try full php tags [code]<?php?>[/code]once you get that printing out the variables then you will have to call that page directly and then call the page through various proxies as you can and look for some telltale variables. Quote Link to comment Share on other sites More sharing options...
Tasc0 Posted December 5, 2006 Author Share Posted December 5, 2006 I dont get it. What does this do, or what could I do with it? Quote Link to comment Share on other sites More sharing options...
Caesar Posted December 5, 2006 Share Posted December 5, 2006 [quote author=Tasc0 link=topic=117312.msg479328#msg479328 date=1165355868]I dont get it. What does this do, or what could I do with it?[/quote]That should be spitting out the values in the $_SERVER array/variable. Quote Link to comment Share on other sites More sharing options...
Tasc0 Posted December 6, 2006 Author Share Posted December 6, 2006 I'm pretty newbie to PHP... so I really don't understand what that has to do with detecting a proxy. Quote Link to comment Share on other sites More sharing options...
mainewoods Posted December 6, 2006 Share Posted December 6, 2006 Those $_SERVER variables contain everything sent in the headers of the request for the page. If you can detect a proxy, it would be using one of those variables(looking for a value of or the presence of one of them). That's all you got, there ain't nothing else that you can use. Quote Link to comment Share on other sites More sharing options...
Tasc0 Posted December 6, 2006 Author Share Posted December 6, 2006 Uh... I still don't understand what has to do with detecting a different proxy server. Quote Link to comment Share on other sites More sharing options...
Tasc0 Posted January 1, 2007 Author Share Posted January 1, 2007 Hi, I'm back.I found this script that shows the IP adress even if the users is navigating with a proxy. Doesn't work with elite proxies.I'd like to know if I can show the user the proxy IP.[code]<?php function getIP() { if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) { $ips = $_SERVER['HTTP_X_FORWARDED_FOR']; } elseif (isset($_SERVER['HTTP_VIA'])) { $ips = $_SERVER['HTTP_VIA']; } elseif (isset($_SERVER['REMOTE_ADDR'])) { $ips = $_SERVER['REMOTE_ADDR']; } else { $ips = "unknown"; } echo "Your IP is: $ips"; } if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) { $ip1 = $_SERVER['HTTP_X_FORWARDED_FOR']; } elseif (isset($_SERVER['HTTP_VIA'])) { $ip1 = $_SERVER['HTTP_VIA']; } elseif (isset($_SERVER['REMOTE_ADDR'])) { $ip1 = $_SERVER['REMOTE_ADDR']; } else { $ip1 = "unknown"; } getIP();?>[/code]Thanks in advance. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.