Mailinglisten-Archive |
Ok, hat sich erledigt. Die richtige Antwort wäre gewesen:
function getimdbid ($titel){
$host = "us.imdb.com";
$path = "/Find?$titel+(1999)&select=Titles";
$fp = fsockopen ("$host", 80, &$errnr, &$errstr) or die("$errno: $errstr");
fputs($fp, "GET $path HTTP/1.1\nUser-Agent:Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)\nHost:$host\n\n");
while (!feof($fp)) {
$buffer = fgetss($fp, 4096);
$contents .= $buffer;
}
if(strstr ($contents, " http://us.imdb.com/Title?")){
$anfpos = strpos ($contents, " http://us.imdb.com/Title?");
$ausgabe = substr ($contents, $anfpos+26, 7);
echo $contents;
echo "<br><br><br><b>---------SCHNIPP--------</b><br><br>";
return $ausgabe;
}
}
Troztdem vielen Dank.
php::bar PHP Wiki - Listenarchive