Posted by J.O. Aho on 12/09/06 12:03
Wolfgang wrote:
> Hello,
>
>
> Can anybody tell how to download a picture e.g.
>>> http://www.google.de/intl/de_de/images/logo.gif
> and how to move it to my FTP Account of my Webhost whenever I call my Site.
>
>
> $picture=
> file_get_contents("http://www.google.de/intl/de_de/images","logo.gif");
> echo "Daten: $picture<br>";
>
> does not do anything.
>
> Thanks a lot for any help
>
> ...wolfgang
--- showgoogleimage.php ---
<?PHP
$picture=file_get_contents("http://www.google.de/intl/de_de/images/logo.gif");
$length=strlen($picture);
header('Last-Modified: '.date('r'));
header('Accept-Ranges: bytes');
header('Content-Length: '.$length);
header('Content-type: image/gif');
echo $picture;
?>
--- eof ---
--- the other php script ---
echo "Daten: <img src=\"showgoogleimage.php\" alt=\"Google.de\"
title=\"Current google image\">";
--- eof ---
//Aho
Navigation:
[Reply to this message]
|