Reply to php and flash

Your name:

Reply:


Posted by brian goodall on 02/21/07 23:48

hello, i built a flash site with a 6 sound clip downloads, when somone
clicks the link i want it to count which song has been downloaded using php
to store the info. below is what i have at the moment, which works fine for
one song but i was wondering if anybody here would be good enought to take a
look and tell me how i could modify it to count all 6 sound clips.

within my flash site i have a download button with the folloing
actionscript.

loadVariablesNum("PHPCounter.php?ran="+random(99), 0);

PHPCounter.php and contains the following
<?

$filename = "PHPCounter.txt";

$fp = fopen( $filename,"r");
$Old = fread($fp, 100);
fclose( $fp );

$Old = split ("=", $Old, 5);

$NewCount = $Old[1] + '1';

$New = "Count=$NewCount";

$fp = fopen( $filename,"w+");
if (flock($fp, 2)) {
fwrite($fp, $New, 100); }
fclose( $fp );

print "Count=$NewCount";

?>

my txt file named PHPCounter contains...

Count=1

flash stats page

actionscript = loadVariablesNum("PHPCounter.txt?ran="+random(99), 0);

and dynamic text var = count

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация