Page 1 of 1

Download image to my server with php

Posted: Sat May 24, 2008 2:47 am
by sammeras
Hello,
I am new at php.
I am trynig to download image to my server (OR to my local computer).
The images located at: http://pms.panet.co.il/online/images/music_new/222.jpg
How can download it with php code?


Best regards,
SAM.

Re: Download image to my server with php

Posted: Sat May 24, 2008 4:32 am
by Oren

Code: Select all

$data = file_get_contents('http://pms.panet.co.il/online/images/music_new/222.jpg');
file_put_contents('path/on/my/server/img.jpg', $data);