Q:

Any php function to download an image from web and save it in my server?

is there a function in php which allows to download external file from another server, and put it in mine ?
Thank you

A:

If it's activated on your web space, you can use
file_get_contents()
If you need to simulate a user-agent, do a log-in or other advanced stuff when downloading, you may want to look into the curl family of functions.
Hard core programmers who do it themselves use fsockopen() and consorts to build a connection from ground up.

A:

There isn't a function that will read and write a remote file to a new location at the same time.  That wouldn't be very useful in most cases.  It's pretty easy to accomplish with a pair of functions though:
file_put_contents("local-file.jpg",file_get_contents("http://x.com/img.jpg"));

