Hmmm…i wanna make a flash hit counter…problem is how to do it. I guess PHP is best, but I could use CGI or XML. Anyone willing to help, your time is appreciated. Thanks in advance.
Why go to all that trouble?
Just use a .txt file … There used to be a tutorial on www.were-here.com but that site seems to have died
well thats works too, but a lil hlep i sneeded
use a dynamic text feild and use a “Scrolling Dynamically Loaded Text”
http://www.kirupa.com/developer/mx/dynamic_scroller.htm
then find a HTML hit counter and it should work
plz bear in mind it is 2am and i am so **** at flash if i was u i would ask electrongeek or something he seems to know alot(-:
here’s a script playamarz helped me with
load the php file with loadVars or loadVariables
the number of page views is stored in the variable myCounter
<?php
$handle = fopen("counter.txt", "r");
$contents = fgets($handle, 4096);
$temp = sprintf("%d", $contents);
$temp++;
fclose($handle);
$handle = fopen("counter.txt", "w");
fputs($handle, "$temp");
fclose($handle);
echo ('myCounter=', $temp);
?>
Thanks, I see what I had wrong in my PHP script…still pretty simular.
Hey TitrationX, please make your footer smaller hight wise! THANKS! We appreciate it.
-Mike
NP…hmm seems the php script has a parse error…
hm… it should be this way actually =) (made a little mistake)
//// Line 10
echo ("myCounter=$temp");
oh… so how to put this into html …can teach me?>
<<!--- --->?php
$handle = fopen("counter.txt", "r");
$contents = fgets($handle, 4096);
$temp = sprintf("%d", $contents);
$temp++;
fclose($handle);
$handle = fopen("counter.txt", "w");
fputs($handle, "$temp");
fclose($handle);
echo ($temp);
?<!--- --->>
this should do it
*Originally posted by owen81chua *
**oh… so how to put this into html …can teach me?> **
you just put it in the body.
what would the loadVars code in flash look like?
Hey sintax!
I use for my PHP stuff:
loadVariablesNum("count.php", 0, "GET");
That’s what I use to grab the text for my footer. Then I use “POST” for when someone puts something in that’s new. I don’t know if that’s really correct because I’m just learning PHP, but it works!!
I’ll give something like that a try and see what happens. Thanks Freddy:)
np!
can somebody show me a sample site of this counter.
thanks
mrloo - check out what Jubba talks about a few posts down on this thread. He says exactly how to do it and offers an example shown in HTML. If that doesn’t help you, I’ll throw something together for you.
*Originally posted by Freddythunder *
**mrloo - check out what Jubba talks about a few posts down on this thread. He says exactly how to do it and offers an example shown in HTML. If that doesn’t help you, I’ll throw something together for you. **
thanks, anyway i’ll check it out. If ever, I will ask for your future help.
you are al great, :p:
thanks for helping us (newbies)
loo
freedyhunted, i checked it out but there is post of Jubba in this thread, or am I just blind to see. I am new with this, can someone tell me how to start with this PHP.
thanks, you are all great