Mam taki se skrypcik,jednak wyskakuje mi błąd składni: Parse error: syntax error, unexpected '&', expecting
Oto mój kod:
<html>
<head>
<?php
// - chmod this document to 755! -
$fpt = "daily.txt"; // path to counter log file - chmod it to 666
// optional configuration settings
$lock_ip =0; // IP locking and logging 1=yes 0=no
$ip_lock_timeout =30; // in minutes
$fpt_ip = "ip.txt"; // IP log file - chmod it to 666
// end configuration
function checkIP($rem_addr) {
global $fpt_ip,$ip_lock_timeout; $ip_array = @file($fpt_ip); $reload_dat = fopen($fpt_ip,"w"); for ($i=0; $i<sizeof($ip_array); $i++) {
list
($time_stamp,$ip_addr,$hostname) = split("\|",$ip_array[$i]); if ($this_time < ($time_stamp+60*$ip_lock_timeout)) {
if ($ip_addr == $rem_addr) {
$found=1;
}
else {
fwrite($reload_dat,"$time_stamp|$ip_addr|$hostname"); }
}
}
$host = gethostbyaddr($rem_addr);
if (!$host) { $host = $rem_addr; }
fwrite($reload_dat,"$this_time|$rem_addr|$host\n"); return ($found==1) ? 1 : 0;
}
$this_day=(date("D, j F Y")); $count_dat = fopen($fpt,"w+"); $count = 1;
}
else {
$count = $row[1];
if ($this_day == $test) {
if ($lock_ip==0 || ($lock_ip==1 && checkIP($REMOTE_ADDR)==0)) {
$count++;
}
}
else {
$count = 1;
}
$count_dat = fopen($fpt,"w+"); fwrite($count_dat,"$this_day\n"); }
echo "<center>Odwiedzin dzisiaj: <font color=green>$count</font></center>";
?>
</font>
</html>
Uruchamiam go kodem:
{include file="engine/modules/dcounter.php"}
Dzięki wielkie za pomocną dłoń ;-)
Powód edycji: [Daiquiri]: Tag