"Tamas Bucsu" <[EMAIL PROTECTED]> wrote in message
012c01c12c8b$49cf6750$1100020a@domain1">news:012c01c12c8b$49cf6750$1100020a@domain1...
> Is there any special way to get some pics from
> the web? Cos' what I wrote just does not work.
> Thanks
>
>
>  if (file_exists($kepnev)){
>
> $kepnev="http://www.stg/pics/somethinggy.jpg";];
>
>   $fdr = fopen($kepnev,"r");
>   $fdw = fopen($kepnevshort,"w");
>   while (!feof($fdr)) {
>    fputs ($fdw,fgets($fdr, 4096));
>
>   }
>
>   fclose($fdr);
>   fclose($fdw);
>  }
> }

The simplest method, assuming
the file is web-accessible, is probably
    echo "<img src='$kepnev'>";

If you really need to pass the raw image data
back (ie you're pulling it out of a database or
server file system or dynamically generating it),
you have to start with appropriate headers to
tell the browser how to treat what it's getting, ie
    header("Content-Type: image/jpg");

Also, I bet it helps if you set $kepnev
_before_ you test whether it exists.



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