Welcome to WebmasterWorld Guest from 54.160.221.82

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)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Oct 25, 2003
posts: 664
votes: 0


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)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Nov 15, 2004
posts:1867
votes: 0


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

 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members