en.: i try to copy a jpg-file fomr http:// to a lokal path
dt.: ich versuche über http:// eine jpg-file zum lesen zu öffnen und es dann lokal abzuspeichern
en.: but it doesnt work
dt.: es funkt aber nicht
<?php
function getAndCopy($readfrom, $writeto)
{
$rh = fopen($readfrom, "br");
$wh = fopen($writeto, "w");
while($line = fgets($rh, 4096))
{
fwrite($wh, $line);
}
}
getAndCopy('http://www.lustig.at/BILDCHEN.jpg', $DOCUMENT_ROOT."/test.jpg");
?>
en.: just shi** is saved in the jpg
dt.:es kumtm immer nur eine kurze zeichenkette an
ca so:y..!öä*....
en.: thats not the result i expected
dt.: das ist nicht ganz das ergebnis das ich wollte......
en.: thanx bauchidgw
dt.: vergeltsgott bauchidgw