Funktioniert, super! Vielen Dank! Die Seite #22 hatte ich zwar auch gelesen, aber noch nicht umgesetzt bekommen.
Hier mal der Quellcode:
<?php
function escape($s) {
return str_replace(array("\\","\""),array("\\\\","\\\""),$s);
}
$r = file_get_contents($argv[1]);
$pos = strpos($r,"mgid:uma:video:mtv.de:");
$pos1 = strpos($r,"<title>");
$pos2 = strpos($r,"</title>",$pos1);
if ($pos === FALSE || $pos1 === FALSE || $pos2 === FALSE) die("error\n");
$pos1 += 16;
$title = substr($r,$pos1,$pos2-$pos1);
$id = intval(substr($r,$pos+22,100));
$r = file_get_contents("http://de.esperanto.mtvi.com/www/xml/flv/flvgen.jhtml?vid=$id&hiLoPref=hi");
$pos = strpos($r,"<src>");
$pos1 = strpos($r,"</src>",$pos);
if ($pos === FALSE || $pos1 === FALSE) die("error\n");
$pos += 5;
$flv = substr($r,$pos,$pos1-$pos);
passthru("wget -c -O \"".escape(str_replace("/","_",$title)).".flv\" \"".escape($flv)."\"");
?>