On Wednesday 29 August 2001 23:45, Christopher William Wesley wrote:
> On Wed, 29 Aug 2001, Joseph Bannon wrote:
> > I want to use fgets to get an image off the server and then print it.
> > Kinda like if you call the script picture.php, an image will appear.
> > How do I do
>
> I do this, with fopen() and fpassthru() ...
>
>         $im = fopen( "myImage.jpg", "r" );
>         if( !$im ){
>                 // FILE WASN'T FOUND
>         } else {

// important:
header ("Content-Type: image/jpeg"); // or image/png

>                 // ALL GOOD - SEND IT TO THE BROWSER
>                 fpassthru( $im );
>       }
>       fclose( $im );

-- 
Christian Reiniger
LGDC Webmaster (http://lgdc.sunsite.dk/)

CPU not found. retry, abort, ignore?

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to