How to detect downloading from my website
Posted: Mon May 03, 2010 1:28 pm
Dear Coders,
There are six games on my website which can be downloaded for free.
There is a separate download page for each game.
I have a counter for visits to each download page.
There is a picture of the game on its page, for example: Greed.jpg
But, visits to the page may not result in downloads.
How can I detect actual downloads?
Here is the current code for the "Greed" download page ...
The visits counter ...
<?php $hits=file("../Greed.x"); $hits[0]++; $fp=fopen("../Greed.x","w"); fputs($fp,$hits[0]); fclose($fp); ?>
The picture ...
<p style="text-align:center;"><img src="Greed.jpg"/></p>
The download link ...
<a href="Install_Greed.exe"><br/>Download Greed</a>
That's it.
Now, how do I confirm that a download occurred?
Thank you for your kind attention
(-_-)
There are six games on my website which can be downloaded for free.
There is a separate download page for each game.
I have a counter for visits to each download page.
There is a picture of the game on its page, for example: Greed.jpg
But, visits to the page may not result in downloads.
How can I detect actual downloads?
Here is the current code for the "Greed" download page ...
The visits counter ...
<?php $hits=file("../Greed.x"); $hits[0]++; $fp=fopen("../Greed.x","w"); fputs($fp,$hits[0]); fclose($fp); ?>
The picture ...
<p style="text-align:center;"><img src="Greed.jpg"/></p>
The download link ...
<a href="Install_Greed.exe"><br/>Download Greed</a>
That's it.
Now, how do I confirm that a download occurred?
Thank you for your kind attention
(-_-)