i got a problem
i want to create a counter how many times something is downloaded(link clicked)
my code
but how can I let it do the action that is in the php file?HTML Code:onMouse="php file"
i got a problem
i want to create a counter how many times something is downloaded(link clicked)
my code
but how can I let it do the action that is in the php file?HTML Code:onMouse="php file"
Last edited by nightscream; 06-24-2006 at 07:02 AM.
------------------------------------------------------------------------------------------
If you have any troubles with a website or a script, just send me a pm.
I also code websites in xHTML/css, can code javascript and php too if needed
Well I don't know PHP very well but I do know Action Script.
Wouldn't you create a function that tells the script to release that PHP event when the link is clicked?
You wouldn't use the onMouse event to capture clicks for a download counter. You would point a normal link to the PHP file and perform the counter actions in the PHP. This allows you to store the number of clicks in a text file/database on the server. One the click is counted, you redirect the client to the actual file they want to download. Use this PHP to do the redirect:
Note, you cannot send any data to the client before you do the redirect or you'll get an error about the headers already being sent.PHP Code:Header("Location: $url");
Getting Started | Terms of Service | Paid Hosting | Forum Rules | Free Server Status | Banned Countries
If I have helped you through one of my posts, please click the
blue checkbox on the right below my avatar to add to my reputation.
I linked it
now it works thanks
------------------------------------------------------------------------------------------
If you have any troubles with a website or a script, just send me a pm.
I also code websites in xHTML/css, can code javascript and php too if needed