Try it FREE
Knowledge Base Frequently Asked Questions   Phone Phone: +1 (720) 336-8323 M-F 9am-5pm MST   Download Free
Free Trial
Knowledge Base
Knowledge Base » Errors and Troubleshooting » The GeoIP is showing the wrong IPs or all the IPs are same on the traffic monitor
The GeoIP is showing the wrong IPs or all the IPs are same on the traffic monitor

The GeoIP addon has a variable order in obtaining the visitor's email address.  Each server is different and may have different variable that contains the visitor's IP address and it is a matter of finding the correct variable for your server.  As a default, the variable order is:




Your server may even have a different variable that contains the actual visitor's IP address.  Simply add that variable in the $VARS_IP_CAPTURE array.  The system will try the first variable, then the second, then the third, etc.  For the above example, the first variable would be X_FORWARDED_FOR, the second would be HTTP_X_FORWARDED_FOR, etc.  If you would like the REMOTE_ADDR to be the first variable to check, then simply update the $VARS_IP_CAPTURE to:




The save the order of the variable $VARS_IP_CAPTURE, create a new file phplive/API/Util_Extra.php and place the modified values there.  This way, if new values are introduced to the $VARS_IP_CAPTURE in new PHP Live! versions, it will not override your adjusted values.


An example phplive/API/Util_Extra.php with different IP detection order would be:






You may need to adjust the order few times and see which order will obtain the correct visitor's IP address for your server.  As mentioned before, new variables can be included in the order.  Check with phpinfo() output to see all the possible variables your server outputs.  One of them should contain the actual visitor's IP address.

Was this helpful?
could be more helpful? send comment
back to top