Search found 4 matches

by duke
Wed Sep 20, 2006 8:28 pm
Forum: PHP - Code
Topic: retrieve a http file via php and save to ftp
Replies: 6
Views: 466

How does this look ? <?php $source_file = file_get_contents("http://www.example.com/file.wmv"); // check get file status if (!$source_file) { echo "Retrieve file has failed!"; } else { echo "Retrieved $source_file"; } $destination_file = ""; $ftp_server = &quo...
by duke
Wed Sep 20, 2006 6:27 pm
Forum: PHP - Code
Topic: retrieve a http file via php and save to ftp
Replies: 6
Views: 466

Thanks again for the reply

The issue being that the target file is only avaliable via http, and is hosted on a 3rd party site.

This may not be possible at all.

So the script would run as a cron job and will take the http file and put it either in http or ftp on my server.

Hope this makes sense
by duke
Wed Sep 20, 2006 5:54 pm
Forum: PHP - Code
Topic: retrieve a http file via php and save to ftp
Replies: 6
Views: 466

Thanks that was helpful. to an extent.

I'm trying to pull a file (say http://www.example.com/misc/file.avi)

And put it on my ftp. Via php and executed through a cron job on my cpanel server...

I can handle the cron job part, but my php abilities suck

crazy ?
by duke
Wed Sep 20, 2006 4:46 pm
Forum: PHP - Code
Topic: retrieve a http file via php and save to ftp
Replies: 6
Views: 466

retrieve a http file via php and save to ftp

feyd | Please use , and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color] Hi all So...