
January 22nd, 2004, 02:33 PM
|
|
Contributing User
|
|
Join Date: Mar 2003
Location: houston
Posts: 94
Time spent in forums: 8 h 40 m
Reputation Power: 6
|
|
|
Need dirt simple hit counter.
I know this is a topic that is beat to death but I can’t seem to find anything that is basic enough that I can understand how it works (so I can make the necessary changes or adjustments.) I need to make a quick and dirty hit counter. All I want to do is write to a txt file every time the page is loaded. In other words I would have a txt file on the server named “visitors.txt” with one line of text on the page “&visit=1” and I would have a dynamic text box in the flash page (swf) named “visit”. When ever anyone loads the page I need the “swf” page to write to the file “visitors.txt”. Specifically I need it to take the value of “visit” and add “1” to it and return the results to the text box on the flash (swf) page, and I need the value of “visit” to be changed to the new value so that every time the page is loaded the value displayed in the dynamic text box “visit” is 1 greater than the last time the page was loaded.
The problem I am having is that everything I can find on this has so many extra bells and whistles that I lack the expertise to edit it. What I need is something that does just this one thing in as few lines of code as possible.
I have been looking at the fopen approach and it looks promising but again everything I can find so far goes a lot further than I need and at present I lack the expertise to work with it.
I am just learning the php side of this and my approach is to start with the simplest possible code I can get and then from there I can expand on it as needed.
NOTE; I am using Flash MX and really am not familiar with version 4 or 3 actionscript. In other words it may as well be Greek ( I only point this out because I have found a lot of actionscript that is from earlier versions and I don’t understand it because it uses forms / methods / etc. that are not found in any of the material on Flash MX
|