iostream71
Programmer
it works fine until i close the browser, then open a new instance. it causes my ie6 to think it's offline, displaying the work offline/try again box. works fine for netscape with no crashes
basically, i have a flash animation that calls this script, and it writes the count to a text file which flash reads
<?php
session_start();
//counter file
$filename = "counter.dat";
$fp = fopen ($filename, "r"
$count = fread ($fp, filesize($filename));
fclose ($fp);
//user hasn't visited
if (!isset($HTTP_SESSION_VARS['count'])) {
//junk variable to determine visit
$HTTP_SESSION_VARS['count'] = 1;
$count++;
$fp = fopen( $filename,"w"
fwrite($fp, $count, filesize($filename));
fclose( $fp );
}
//write for flash
print "&counterValue=";
print $count;
?>
basically, i have a flash animation that calls this script, and it writes the count to a text file which flash reads
<?php
session_start();
//counter file
$filename = "counter.dat";
$fp = fopen ($filename, "r"
$count = fread ($fp, filesize($filename));
fclose ($fp);
//user hasn't visited
if (!isset($HTTP_SESSION_VARS['count'])) {
//junk variable to determine visit
$HTTP_SESSION_VARS['count'] = 1;
$count++;
$fp = fopen( $filename,"w"
fwrite($fp, $count, filesize($filename));
fclose( $fp );
}
//write for flash
print "&counterValue=";
print $count;
?>