mapleleaf Posted July 8, 2009 Share Posted July 8, 2009 I have an mp3 file I need to grab from site every few days. It is a 30mb file and would be much easier if I didn't need to download and then upload to my site. Any one know of a way I can grab the url of the site and get it to download to the server so i can be cut out of the loop? Quote Link to comment Share on other sites More sharing options...
corbin Posted July 8, 2009 Share Posted July 8, 2009 If HTTP wrappers are enabled: file_get_contents If not: fsockopen Quote Link to comment Share on other sites More sharing options...
rhodesa Posted July 8, 2009 Share Posted July 8, 2009 yup, file_get_contents() should work...as well as copy() you will also want to use: set_time_limit(0); to keep the script from timing out Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.