Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- getting files over ftp/http
August 10, 2006, 5:06 pm
rate this thread
probably prutent to ask something. If I were to pass a php page either
an ftp or http address of an image file (assuming it had a username and
password coded in), would I be able to make it go and get that file and
save it in a folder local to that page?
Re: getting files over ftp/http
Try using file_get_contents works alot better when it comes to opening
URLS since the stream might be caught off when using fopen.
Concerning if you can download the image straight from a URL
#1. What you can do is hit the page
#2. Remove all references (image paths) from the page
#3. Open up the images individually using imagefromjpg($path) <-- ?
#4 Save the stream that the imagefromjpg returns as a jpg file. :-)