# Q on tutorial - 'Hit Counter in Flash using PHP'

**URL:** <https://forum.kirupa.com/t/q-on-tutorial-hit-counter-in-flash-using-php/239656>\
**Category:** flash\
**Created:** [September 24, 2007, 3:35pm UTC](https://forum.kirupa.com/t/q-on-tutorial-hit-counter-in-flash-using-php/239656 "2007-09-24T15:35:21Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rudutdo](https://avatars.discourse-cdn.com/v4/letter/r/ea5d25/32.png) [@rudutdo](https://forum.kirupa.com/u/rudutdo)\
**Post date:** [September 24, 2007, 3:35pm UTC](https://forum.kirupa.com/t/q-on-tutorial-hit-counter-in-flash-using-php/239656/1 "2007-09-24T15:35:21Z")

</div>

Hi There,

I have just put this hit counter into one of my latest games  
[URL=“[http://www.kirupa.com/developer/mx/hitcounter.htm](http://www.kirupa.com/developer/mx/hitcounter.htm)”]  
[http://www.kirupa.com/developer/mx/hitcounter.htm](http://www.kirupa.com/developer/mx/hitcounter.htm)

This works great if the flash file/game is hosted only from your own site. But I would like to see this counter work globally. Say for eg if I put the flash file onto newgrounds, ebaumsworld and hallpass… How can I get the counter to keep counting the amount of views my game has had?

The way I though was this by putting my full address before the variables like this

[COLOR=black][FONT=Courier New][FONT=Verdana]from this…[/FONT]  
[/FONT] [COLOR=#0000ff][FONT=Courier New] this.loadVariables(“counter.php?num=”+random(99));[/FONT]

[COLOR=Black]to this…[/COLOR]  
[/COLOR][/COLOR][COLOR=black][COLOR=#0000ff][FONT=Courier New] this.loadVariables(“[http://mysite.com/counter.php?num=](http://mysite.com/counter.php?num=)”+random(99));[/FONT]

[COLOR=Black]But this didnt work.

Is there a way of doing this? Any help would be greatly appreciated

Tim[/COLOR]  
[/COLOR][/COLOR]
