I thought Programming would be the best place to get answer to this question as it can be done through several ways in different programming languages, but the concept still stays the same. I want to find the user's ip address, the real ip address. If a user is using the proxy, I want to know the proxy ip address as well as the real ip address behind the proxy. Is it possible? I am open to take answers in PHP or Javascript. How can I find it or is it just not possible?
You may want to have a look at this. http://www.programmingtalk.com/showthread.php?t=31596 http://www.programmingtalk.com/showthread.php?t=32784
I disagree with you and krakjoe on this, anonymity is not the sole reason why proxies are made, I wouldn't even say they are the main reason. Proxies can be used to cache content, speeding up the request, to block offensive content, reformat pages for certain devices such as PDAs and cell phones or protect against computer viruses. All of these things can be done with providing any anonymity to the user. Anonymous proxies do get a lot of attention though and if a visitor to your site is using an anonymous proxy you won't be able to get their real ip address. If on the other hand they are using a non-anonymous proxy you can normally get both the proxies ip address and the ip address of the actual visitor. See the threads posted by nico for info
I believe there's a server variable called FORWARDED_IP or something very similar It's not always present though
ahh, here's what you want: http://www.justin-cook.com/wp/2006/11/28/how-to-retrieve-a-visitors-ip-address/
and whether any body tested out this from a proxy as I want to know the results as it can be used to prevent the spam in directories and Sorry to all I tested it out and found that it does not show the real ip address
If the proxy is anonymous you will never get a real ip address. Only transparent (non anonymouys) servers spill visitors ip address because presence of X_FORWARDED_FOR variable show they original ip address. However it is possible to detect of visitors is behind proxy server even if they use (high) anonymous servers through checking IP on most common proxy ports. Take a look: Proxy Server Detection
I sed this also and I found that my real ip address is not being shown I can get only the ip address of the host I used this proxy www.blockmy.info
If you have a good proxy, they will not give away any information at all. The example above is a good one.
That means we can idetify the real ip address from some proxies if their script is not upto the mark and if you can provide me with some other proxies where I can see the users Real IP address via this script
I take it from the above information that it should be possible to block access to visitors who are using proxies and thus prevent them from spamming your directories?
This might help <?php // use this script to detect whether a user is using a //proxy server to connect to your website. echo "Proxy Detector"; if(isset($HTTP_X_FORWARDED_FOR)) { if ($HTTP_X_FORWARDED_FOR) { // proxy detected... ?> Proxy Detected... Your Actual IP Address: <?= $HTTP_X_FORWARDED_FOR ?> Your Proxy Server: <?= $HTTP_VIA ?> You Proxy I.P address: <?= $REMOTE_ADDR ?> <? } } else { // no proxy detected ?> No Proxy Detected Your Actual IP Address: <?= $REMOTE_ADDR ?> <? } ?> HTML: I found this when I searching google
This is surely possible. Otherwise people would have gone to their sites thru proxy and clicked on their own ads and generated revenue. GOogle mentiones they check real ip addresses. I can't remember where I read it.