I was actually going through the question 1636644 .. and got confused with this
" The getenv() function access to any environment variable to get the related value! "
Also ..
" It would probably be better to use $_SERVER['REMOTE_ADDR']; to prevent incompatibilities between servers. "
what kind of compatibility issue can this be ??
Lastly, it says $_SERVER is an array with many elements but I find only the IP Address there .. does this array store anything else too???
apologies for all these questions packed in one .. this is bcoz these are all related ..
To see what all
$_SERVERcontains, just do:The pre tag just makes the output presentable in the browser.
To see ALL of the environmental variables that the server is setting (and tons more), make a script that just has:
It will be listed toward the bottom, as
PHP Variables.The differences in environment variables can be based on the HTTP server (apache vs IIS) and other factors, such as if the page is served over SSL.