I'm still working on the whole gathering user data from a visit thing, so I'm hung up on grabbing the actual name of the browser being used by the visitor. I have this code, but it seems that after execution, $browser
is empty.
$userAgent = mysql_real_escape_string($_SERVER["HTTP_USER_AGENT"]);
$browser = get_browser($userAgent, true);
print_r($browser);
What am I doing wrong here, and what steps do I take next to extract the browser from the array?
EDIT
Okay so now I have the following code:
$browser = get_browser(null, true);
$userAgent = $browser["browser"];
$browser = mysql_real_escape_string($userAgent);
echo $browser;
Which does nothing. Any insight?