Jump to content

Get real IP Address


php-beginner

Recommended Posts

Hello guys,

 

I have been searching on the internet for articles that shows me how to get the real IP address when they are behind a proxy. But after some reading it seems that this is not completely possible. Correct me if I'm wrong.

 

So what is the best thing to do? Because I have seen different methodes and I'm not sure which one is the best.

 

http://www.laughing-buddha.net/php/lib/remoteip

Link to comment
Share on other sites

If a user is behind a proxy, the only way for you to get their IP is if the proxy explicitly forwards that information to you.  There is a convention for proxies to pass that information a long in an X-Forwarded-For header.  Reverse proxies like Varnish can do that.

 

 

Link to comment
Share on other sites

Proxies aren't meant to be detected, well not the ones people will use to create multiple accounts on your website.

The short and simple answer to this, is: Forget it, there is no way you will be able retrieve the "real" IP address of someone behind an anonymous proxy.

 

If they had malicious intent, you can contact the proxy administrator and request the originating IP address. This still may not be the real IP address.

Link to comment
Share on other sites

I'm sorry if I sounded harsh about it, but many, many people ask about this topic.

 

What I said may not be 100% correct, as there are methods to blocking proxies themselves, but lists aren't 100% accurate, though they are your best bet.

I'd suggest looking into something like DNSBL, which is a list of know spammers/offenders.

Link to comment
Share on other sites

I agree with Mens,

 

Say for instance you live in a house with 30 students and you all have the same ip-address, If you only allow 1 you miss 29 potential customers.

If you want to block certain content, or automated bots. use other methods like captcha,

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.