Getting your user-agent

I just whipped up a short PHP script to display the user-agent and IP of a client’s browser. I wanted this because I was writing to Citizens Bank about a bug in their home page (a broken browser detection script). The script can be used here and the content of it is very simple:

<?php
echo "Your browser is reporting the agent string: '";
echo $_SERVER['HTTP_USER_AGENT'];
echo "'<br>Your IP address is ".$_SERVER['REMOTE_ADDR'];
?>

Yeah.

Leave a comment