Log in

View Full Version : How can I do this in Vbulletin...


Raffaele
07-09-2008, 04:38 AM
Hi everyone, how can i do this... i would like to add this into my Vbulletin this is the code...

<?
if (getenv(HTTP_X_FORWARDED_FOR)) {
$ip_address = getenv(HTTP_X_FORWARDED_FOR);
} else {
$ip_address = getenv(REMOTE_ADDR);
}
?>

code taken from here>>> http://www.justin-cook.com/wp/2006/11/28/how-to-retrieve-a-visitors-ip-address/

what this code does is should give me the real IP address of the user even if he/she is on a proxy during registering.

Why i want to do this i noticed some User that register is always spamming the forum even if i have the Human Interface checked.

Any help is very appropriated,
Raffaele

Dismounted
07-09-2008, 05:03 AM
That will only give you the IP address if the proxy the user is using passes on the IP. Any determined user will not use a proxy that passes this information on.

In any case, vBulletin already implements that code (albeit a slightly more complex and better version).

Raffaele
07-09-2008, 05:21 AM
WOW... that was fast :) thank you i didn't know that vbulletin has it already!

Thank you Dismounted very much.

Raffaele