Problem gelöst: Im Data-Block müss zusätzlich vor Boundary
nochmals zwei -- davor:
nochmals zwei -- davor:
PHP-Code:
<?
srand((double)microtime()*1000000);
$boundary="---------------------------".substr(md5(rand(0,32000)),0,10);
$data ="--".$boundary."\n";
$data.="Content-Disposition: form-data; name=\"$name\"; ";
$data.="filename=\"$filename\""."\n";
$data.="Content-Type: image/gif\n\n";
$data.=$daten."\n";
$data.="--".$boundary."--"."\n";
$head ="POST $path HTTP/1.0\n";
$head.="Host: $host\n";
$head.="Content-type: multipart/form-data; boundary=".$boundary."\n";
$head.="Content-length: ".strlen($data)."\n\n";
?>
Kommentar