PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
how would i make php write out one line of text if the location (the browser location) is somewhere (say: http://127.0.0.1) and print out something else if the location is somewhere different (say: domain.com)
im sure it would be something like:
if
location = http://127.0.0.1
echo "localhost"
elseif
location = http://domain.com
echo "away from home"
I think you would rather use $_SERVER['REMOTE_HOST'] or $_SERVER['REMOTE_ADDR'] if you are trying to get client information. If you want server information then you would use $_SERVER['SERVER_NAME']