Victor Polyushko wrote: > > Hi Guys, > > Thank you fo your input. I am sorry I am new to the list so + English is not > my first language :-( anyhow., I shoudl 've made my question more clear. > > I am trying to save the image from the given URL > (http://domain.com/image.gif) running a PHP script on the page. I have tried > fread() and it does not allow me to accomplish that :-(( > > Have you guys ever come across such a problem?
$imageData = implode( '', file( 'http://domain.com/image.gif' ) ); $length = strlen( $imageData ); if( $length > 0 ) { if( (fh = fopen( 'destination', 'w' )) ) { fwrite( fh, $imageData ); } } Cheers, Rob. -- .-----------------. | Robert Cummings | :-----------------`----------------------------. | Webdeployer - Chief PHP and Java Programmer | :----------------------------------------------: | Mail : mailto:[EMAIL PROTECTED] | | Phone : (613) 731-4046 x.109 | :----------------------------------------------: | Website : http://www.webmotion.com | | Fax : (613) 260-9545 | `----------------------------------------------' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php