Downloading from another server with PHP
Posted: Thu Jan 18, 2007 4:04 pm
What would be the code for downloading from a link to the server then displaying the new link.
Example
I am browsing the internets and I find http://www.yoursite.com/thisisawesomebu ... ternet.jpg
Normally if I wanted to post that picture to my site I would either have to link directly to their image and steal their bandwidth (very much frowned upon) or right click save as and then upload it to my ftp. Then post it. All which is a bit of a hassle.
I want to be able to go to a webform and paste in the url to the picture. Click submit. The php downloads the pic to the server and tells me the new address is http://www.mysite.com/thisisawesomebuta ... ternet.jpg.
I'm guessing this is pretty basic but I'm not sure where to start looking
Example
I am browsing the internets and I find http://www.yoursite.com/thisisawesomebu ... ternet.jpg
Normally if I wanted to post that picture to my site I would either have to link directly to their image and steal their bandwidth (very much frowned upon) or right click save as and then upload it to my ftp. Then post it. All which is a bit of a hassle.
I want to be able to go to a webform and paste in the url to the picture. Click submit. The php downloads the pic to the server and tells me the new address is http://www.mysite.com/thisisawesomebuta ... ternet.jpg.
I'm guessing this is pretty basic but I'm not sure where to start looking