BINGO!! thank you guys for your input
I used a very simple command to accomplish that and it works!!
<?
$command="wget http://domain.com/images/somepic.gif";;
system( $command, $result);
echo $result; ?>

Victor Polyushko

----- Original Message -----
From: "Robert Cummings" <[EMAIL PROTECTED]>
To: "Victor Polyushko" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Thursday, May 16, 2002 2:25 PM
Subject: Re: [PHP] Can anyone help me save img from URL?


> 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
>
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to