$autor= $_POST["autor"]; $titul= $_POST["titul"]; $autor= urlencode($autor); $titul= urlencode($titul); $host= "aleph.lib.cas.cz"; $port= 80; $pom= 0; $fp= fsockopen($host, $port); if (!$fp) { echo "Nepodařilo se načíst stránku\n"; } else { fputs($fp, "GET /F/ HTTP/1.0\r\n"."Host: aleph.lib.cas.cz\r\n\r\n"); while ((!feof($fp)) and ($pom==0)) { $line= fgets($fp, 1024); $sid=strstr($line, "window.location.replace"); if ($sid) { $pom= 1; $sid= strstr($sid, "F/"); $sid= strstr($sid, "/"); $sid= substr($sid, 1, -31); } } fclose ($fp); } header("Location: http://aleph.lib.cas.cz/F/".$sid."?func=find-b&request=".$autor."+".$titul."&find_code=WRD&x=0&y=0"); echo "". "
". "Přesměrování selhalo. Porakčujce na http://aleph.lib.cas.cz .
". "