Jump to content

Recommended Posts

That will not always be filled or it will not always contain the actually client ip. Such as when a client is using a proxy or they are using many pass thru proxies. If you want to be 100% sure, then you need to check...

 

REMOTE_ADDR (assign 2 variables [ip, op])

HTTP_CLIENT_IP (if this is set, assign op to this value)

HTTP_X_FORWARDED_FOR (else if this is set, you will have to loop each ip, removing network masked ip(s) and then assigning op this value)

HTTP_FROM (else if this is set, assign op to this value)

 

in that order

 

At the end of that, if $ip == $op, then client is using a unique ip, else if $ip != $op, client is using proxy gateway ip, (ip is shared)

 

It important to do that when you create a (BLOCKING BY IP) so you only block that client, not the proxy because it is shared by thousands of users, (AOL,NETZero,most mobile phones,...)

You could also pull all the variables on the server by using:

echo "<b>_SERVER</b><br />";
foreach($_SERVER as $clave=>$valor)
{
echo $clave." = ".$valor."<br />";
}

this also works very well for debugging, so you can see what variables are being sent by changing the variable type.

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.