Jump to content

log script parse error


Lassie

Recommended Posts

I am trying to use a simple log script which gives a parse error i cant see the cause of

The error is enexpected':' on $country_file line.

Any help is appreciated.

Function logthishit($sessionid, $pagevisited, $ip, $browser, $refer)
{
$log = fopen("log.txt","a");

$countryfile = fopen(http://ip-to-country.com/gert-country/?ip=$ip&user=guest&password=guest,"r");
$country = fgets($countryfile,50);
fclose($countryfile);
$now = date("d F Y h:i:s A");

fwrite($log,"$now,$sessionid,$pagevisited,$ip,$country,$browser,$refer\n");
$log = fclose($log);

}

Link to comment
https://forums.phpfreaks.com/topic/86910-log-script-parse-error/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.