![]() |
Users [vB 4.0] - Real IP address Hi, From the first vBulletin release I have used (3.5.X), until now (3.8.4). The IP address function is: PHP Code: function fetch_ip(){ return $_SERVER['REMOTE_ADDR']; } This code doesn't give the real IP Address if the user is using proxy. In many countries, specially in the Middle East, all requests are sent through proxy, So you wont get the real IP address using $_SERVER['REMOTE_ADDR'], this means that many users will have the same IP address. Today I have changed the fetch_ip() function in class_core.php file, I used this code: PHP Code: function fetch_ip(){ if(isset($_SERVER['HTTP_CLIENT_IP'])){ return $_SERVER['HTTP_CLIENT_IP']; }else if(isset($_SERVER['HTTP_X_FORWARDED_FOR'])){ return $_SERVER['HTTP_X_FORWARDED_FOR']; }else{ return $_SERVER['REMOTE_ADDR']; } } After changing the function code, I noticed that the online users number have increased from 500 to 1200 !!, this happened because now it gets the real IP address, and it counts the real number of online visitors. So, if vBulletin uses the second code which gives the real IP, it would be better for all forums so they can get the real statistics for their forums, and when they ban an IP address, they will ban 1 person only, not a group of people. Regards, Ibrahim Moahammed |
الساعة الآن 01:31 PM |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.5.2 TranZ By
Almuhajir