Hello all!
I have followed the tutorial on creating a live page counter in flash and somehow run into a problem to which i don’t seem to be finding the solution. Perhaps someone here might be able to offer his/her generous help in solving this issue.
Problem:
The page counter works just fine the first time i load the page. After doing a refresh using the Ctrl & F5 key or just by clicking on the refresh button in my browser the count keeps going up (which as far as i understood from the tutorial is not supposed to happen).
When i do the same kind of refresh on the tutorial page the count stays unchanged though!
I also downloaded the finished fla file but for some reason or other flash MX doesn’t let me open it, giving me the error: “unexpected file format”.
Here is my code of the php file that i wrote for the counter.
<?php
$file = fopen(“count.txt”, “r”);
$count = fread($file, 10240);
fclose($file);
$count = explode("=", $count);
$count[1] = $count[1]+1;
$file = fopen(“count.txt”, “w+”);
fwrite($file, “count=”.$count[1]);
fclose($file);
print “count=”.$count[1];
?>
I am using PHP Version 4.2.2 running as an apache module on a redhat 9 linux box.
Hope that someone can help me here.
Thanx in advance for taking the time to read my post!
Mike. :hr: