Jump to content

Download Tracker


stkr
 Share

Recommended Posts

Hello everyone! I'm back with another question about my website. I have created a page where users can download wallpapers. It's simple a jump menu that allows users to select their screen resolution to get a copy of an image on my server that is that exact resolution. What I would like to do is to track how many times each wallpaper is downloaded. I want to see which wallpapers get the most attention, basically so that I can remove ones that users don't seem to like. Here is the page that I am working on: http://lostvalley-photography.com/wallpapers.htmlAnd here is the code for the download jump menus just in case it is needed:

  <div>  <img src="images/Buttons/wallpapers/leaf.jpg" alt="Dragonfly" width="240" height="150" border="0" /><form id="form1">	<select name="jumpMenu" id="jumpMenu">	  <option>Select Resolution:</option>	  <option value="images/wallpapers/Sunlight_1680x1050.jpg">1680x1050</option>	  <option value="images/wallpapers/Sunlight_1280x800.jpg">1280x800</option>	  <option value="images/wallpapers/Sunlight_1440x900.jpg">1440x900</option>	  <option value="images/wallpapers/Sunlight_1024x768.jpg">1024x768</option></select>	<input type="button" name="go_button" id= "go_button" value="Download" onclick="MM_jumpMenuGo('jumpMenu','parent',0)" />  </form><p> </p>  <img src="images/Buttons/wallpapers/dragonfly.jpg" alt="Dragonfly" width="240" height="150" border="0" /> <form id="form2">	<select name="jumpMenu" id="jumpMenu">	  <option>Select Resolution:</option>	  <option value="images/wallpapers/Dragonfly_1680x1050.jpg">1680x1050</option>	  <option value="images/wallpapers/Dragonfly_1280x800.jpg">1280x800</option>	  <option value="images/wallpapers/Dragonfly_1440x900.jpg">1440x900</option>	  <option value="images/wallpapers/Dragonfly_1024x768.jpg">1024x768</option></select>	<input type="button" name="go_button" id= "go_button" value="Download" onclick="MM_jumpMenuGo('jumpMenu','parent',0)" />  </form></div>

So, is there a way to track the popularity of the wallpapers that I add?

Link to comment
Share on other sites

Instead of linking directly to the files you need to link to a download script, like a PHP script, that will update a counter in a database and then redirect to the actual file.
Would something like this do the job?http://www.zubrag.com/scripts/download.phporhttp://www.phpjunkyard.com/php-click-counter.phpAnd if not, do you have any recommendations? Edited by stkr
Link to comment
Share on other sites

You could probably use one of those, it's not a very difficult script to just write though. Does your site have a database? Have you worked with PHP before?
I've never worked with .php before but the second link, from what I've seen so far, is exactly what I'm looking for. The instructions are pretty straightforward as well. What exactly do you mean by database?Thanks :)
Link to comment
Share on other sites

A database is where most interactive sites store their data. MySQL, Microsoft SQL Server, Oracle, Access are all databases. I'm assuming that most pre-made scripts will probably store the counter information in a series of text files instead of a database, but if you aren't familiar with PHP programming it will probably be easier to just use a pre-made script.

Link to comment
Share on other sites

That's exactly what it does. I've got everything installed properly now, but I'm having issues setting my file permissions on GoDaddy. Other then that, I think I've got it.

Link to comment
Share on other sites

Well it worked up until the point where the .php file needed to write to the txt files. According to GoDaddy, this isn't going to work since I can't give a .php file the necessary permissions for this to work.

Your hosting account is currently a Windows account running IIS6. PHP support is only available on either a Linux hosting account or Windows account with IIS7. I would suggest changing the operating system of your hosting account to Linux where PHP is supported if you do not need Windows for any ASP scripting uses.
I'm not sure what I could do at this point. I would prefer to stay with Windows, and the support tech just further explains how I would switch over to Linux. Edited by stkr
Link to comment
Share on other sites

If you don't want to switch, you might be able to find an ASP script to do the same thing. I'll point out that there's no technical reason why GoDaddy wouldn't install PHP on their Windows servers, PHP works just fine running under IIS.

Link to comment
Share on other sites

I finally found one that worked and logged downloads for me. The interface is terrible though and makes it really tedious and annoying to view, especially for a lot of files. I'll just live without knowing and rotate out wallpapers or something. Thanks, I appreciate your help. :)

Edited by stkr
Link to comment
Share on other sites

  • 2 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...