Question

Since i dont want to change openx coding and i wanna to set the IP from header to the php $_SERVER['REMOTE_ADDR']

Is there any way to extract a IP from header (pre-set by other program already in load balancing web server) before any php code running?

Was it helpful?

Solution

You can't set $_SERVER['REMOTE_ADDR'] before PHP wrapper does (cgi/module). But using the .htaccess php_value "auto_prepend_file", you can request a script to be executed before anything else, and this way, you're free to set $_SERVER['REMOTE_ADDR'] with anything you want in it.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top