OK, well i am a n00b when it comes to php, i have the basics of html down and i can scrape by javascript, but im lost when it comes to php. i am aware of all the "wonders" php can do. So heres my whole story. I am an anime fanatic and i want to make this script that goes to a certain url (that may not exist because it is the URL of a FUTURE file) and i want the script to loop and keep trying to download that file until it finally can. Once it can be downloaded, i want the script to actually download it and open the file (in this case, a torrent). I also want to make it so I simply add the episode number and the url automatically changes the url string to whatever its supposed to be.
For example, i want episode 100 in a series. The URL for any episode is http://www.somesite.com/files/ep(any number).torrent. So if i want episode 100, i type in 100 into a form and the URL should automatically search for http://www.somesite.com/files/ep100.torrent. A problem is that, say, episode 100 may not be online yet for download, meaning the link cannot be opened. I know enough php to know that it uses the $POST_ variable for the form thing, so thats not the problem. the main problem is getting the script to loop with the unexisting file, until it exists and then downloading and opening it. can i use fopen() for this? thnx in adv.
oh btw, dont bother making the whole code, i want to use this as a challenge for myself. I just want some hints pointing me in the right direction 
Last edited by nasaboy007; 06-30-2005 at 10:05 AM..
|