hungryOrb Posted September 11, 2008 Share Posted September 11, 2008 Hi I wonder if someone could spend 20 seconds helping me with this? please please! My code so far: <?php $browserFile = "browsers.txt"; $fh = fopen($browserFile, 'a') or die("can't open browser txt file"); if (strpos($_SERVER['HTTP_USER_AGENT'], 'Firefox')){ echo $this->template; ?>/css/template.css" rel="stylesheet" type="text/css" /><?php $stringData = "Date: ".date("D/M/Y").". Firefox\n"; fwrite($fh, $stringData); fclose($fh); }else{ if (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 6')){ echo $this->template; ?>/css/template.css" rel="stylesheet" type="text/css" /><?php $stringData = "Date: ".date("D/M/Y").". InternetExplorer 6\n"; fwrite($fh, $stringData); fclose($fh); }else{ echo $this->template; ?>/css/template.css" rel="stylesheet" type="text/css" /><?php $stringData = "Date: ".date("D/M/Y").". Other browser\n"; fwrite($fh, $stringData); fclose($fh); } } ?> EEP. Link to comment https://forums.phpfreaks.com/topic/123736-small-script-to-record-user-browsers-to-text-file/ Share on other sites More sharing options...
adam291086 Posted September 11, 2008 Share Posted September 11, 2008 what errors are you getting? add error_reporting(E_ALL); to the top of the page and that will throw out any errors. Link to comment https://forums.phpfreaks.com/topic/123736-small-script-to-record-user-browsers-to-text-file/#findComment-638924 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.