# Flash&php btn.counter?

**URL:** https://forum.kirupa.com/t/flash-php-btn-counter/41270
**Category:** Uncategorized
**Created:** [January 27, 2004, 6:35am UTC](https://forum.kirupa.com/t/flash-php-btn-counter/41270 "2004-01-27T06:35:34Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![timothye](https://avatars.discourse-cdn.com/v4/letter/t/a698b9/32.png) [@timothye](https://forum.kirupa.com/u/timothye)
#### Post date: [January 27, 2004, 6:35am UTC](https://forum.kirupa.com/t/flash-php-btn-counter/41270/1 "2004-01-27T06:35:34Z")

</div>

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

```auto

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  
🙂
