vbulletin: getting user ip behind a proxy

if vbulletin is behind a proxy, the ip of the user would be the ip of the proxy server instead of the ip of the user. Instead of hacking the includes/class_core.php file we can install the runkit extension, ie http://www.php.net/manual/en/runkit.installation.php

then create a plugin consisting of the following:


$vbulletin->ipaddress = $vbulletin->alt_ip;
runkit_constant_redefine('IPADDRESS', $vbulletin->ipaddress);

Author: bpeh

Bernard Peh is a great passioner of web technologies and one of the co-founder of Sitecritic.net Website Design and Reviews. He works with experienced web designers and developers everyday, developing and designing commercial websites. He specialises mainly in SEO and PHP programming.