Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Make a URL download script
Old 06-29-2005, 09:32 PM How to Make a URL File download script
Super Talker

Posts: 116
Trades: 0
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
__________________


Please login or register to view this content. Registration is FREE


Last edited by nasaboy007; 06-30-2005 at 10:05 AM..
nasaboy007 is offline
Reply With Quote
View Public Profile Visit nasaboy007's homepage!
 
 
Register now for full access!
Old 07-01-2005, 12:03 AM
reli4nt's Avatar
Extreme Talker

Posts: 168
Location: New York
Trades: 0
Php scripts run when you access the page. Not night and day like you would need here. Or did i misunderstand?
__________________

Please login or register to view this content. Registration is FREE

Designing the world we live in.
Defining the terms we live by.
reli4nt is offline
Reply With Quote
View Public Profile Visit reli4nt's homepage!
 
Old 07-01-2005, 09:17 AM
leavethisplace's Avatar
Ultra Talker

Posts: 297
Trades: 0
You can, however, "push" the php to work day and night by using something else altogether called "Cron Jobs". Cron Jobs are pretty handy, and are often used on huge sites to automate maintanence jobs such as cleaning Databases or deleteing redundant members or old messages etc etc. Cron Jobs are fairly easy to use, but only a few web hosts allow them, because if used in the wrong way, can really go wrong!

Do a google search about Cron Jobs
__________________
A lie gets halfway around the world before the truth has a chance to get its pants on. - Sir Winston Churchill

Please visit my sites:
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
leavethisplace is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Make a URL download script
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.83297 seconds with 12 queries