Welcome to WebmasterWorld Guest from 54.162.240.235

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

Copying Image via PHP

From URL not Local File

     
5:41 pm on Oct 27, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hey everyone,

I was curious if this is possible. I would like users to enter a url of an image and for a php script to copy the image to a local folder on my site.

Is this possible?

Thanks in advance for your help!

Wes

5:00 am on Oct 28, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I would like users to enter a url of an image and for a php script to copy the image to a local folder on my site.

You can use the copy function of PHP to do the task for you:
copy("http://www.example.com/myimage.jpg","myfolder/new.jpg");

Refer the manual [php.net] for further details.

Habtom

 

Featured Threads

Hot Threads This Week

Hot Threads This Month