hello ,ihave a button that calls to a zip file on my server,and i have a txt field that i want to show how many times that button has been clicked .like "“this file has been downloaded x ammount of times” with the number being shown in a dynamic textarea. i cannot get it to work…
btn code
downloadBtn.onRelease = function() {
_root.count = 1;
loadVariables("count.php", 0, "POST");
getURL("myFile.zip", "_blank");
};
//on a mc
//to return the var into flash
loadVariables("count.php", 0, "GET");
//php
<?php
$count = file_get_contents("count.txt");
$count = explode("=", $count);
$count[1] = $count[1]+1;
$file = fopen("count.txt", "w+");
fwrite($file, "count=".$count[1]);
fclose($file);
print "count=".$count[1];
?>
can some one explain how in the heck i can get this to work …
thx a million