Re: PHP|FLASH hit counter
| From: | Chris | Date: | Tue, 28 Mar 2006 01:58:14 +0000 |
| Subject: | Re: PHP|FLASH hit counter | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-232697@lists.php.net to get a copy of this message | ||
Tom Haschenburger wrote:
Got this from a tutorial and I am not able to get this to work. Even when I download the finished files from the site I can't get it to work. It definitely does its job on bringing in the variable but, it never increments any higher from zero. It seems as though I maybe have a problem with reading/writing files. Would someone mind taking a look and see if this looks correct? Using PHP 4.4.2 //FLASH //instance of dynamic text box on stage with variable name count //Frame1 this.loadVariables("counter.php?num="+random(99)); //Frame2 this.loadVariables("count.txt?num="+random(999)); //frame40 gotoAndPlay(2); //PHP <?php $count = file_get_contents("count.txt"); $count = explode("=", $count); $count[1] = $count[1]+1;echo or error_log $count[1] here - is it what you expect? -- Postgresql & php tutorials http://www.designmagick.com/