Checking download links

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
mckyyy
Forum Newbie
Posts: 1
Joined: Mon Jun 28, 2010 10:05 pm

Checking download links

Post by mckyyy »

I have a music site: http://alrightsounds.com/

I use C++ software I wrote to compose/arrange songs in 7 to 60 tone Just Intonation. I have around a thousand songs on the site now and I am preparing to upload another 170 or so.

In order to check user statistics about what songs are downloaded I use the PHP header function to link to some PHP code that checks for bots, then writes the name of the download to a text file. Periodically, I download the text file and run a Perl program for analysis.

My problem is I can't figure out a way to automatically check the download links. If the file is not there, the PHP interpreter on the server downloads a warning message with the file name. A link check sees that a file has been downloaded and claims the link is not broken.

I know I could change the links to plain HTML and download the raw stats from the ISP, then run a Perl program for analysis, but I'm looking for something that's less work, and doesn't involve downloading a lot of data of no interest to me.

Any suggestions?

Thanks,

Marion
Post Reply