function My_headlines ($url) {
$RDF = Parse_url ($url);
$fp = Fsockopen ($RDF [' Host '], $errno, $ERRSTR, 15);
if (! $fp) {
$content = "problema!";
Return
}
if ($fp) {
Fputs ($fp, "GET".) $RDF [' Path ']. "?" . $RDF [' query ']. "http/1.0");
Fputs ($FP, "HOST:".) $RDF [' Host ']. "");
$string = "";
while (!feof ($fp)) {
$pagetext = fgets ($fp, 300);
$string. = Chop ($pagetext);
}
Fputs ($fp, "connection:close");
Fclose ($FP);
$items = Explode ("", $string);
$content = "";
for ($i =0; $i <10; $i + +) {
$link = Ereg_replace (". * "," ", $items [$i]);
$link = Ereg_replace (". * "," ", $link);
$title 2 = ereg_replace (". * <title>"," ", $items [$i]); <br/> $title 2 = ereg_replace ("</title>. * "," ", $title 2);
if ($items [$i] = = "") {
$content = "";
Return
} else {
if (strcmp ($link, $title)) {
$cont = 1;
$content. = "$title 2
";
}
}
}
}
echo "$content";
}
My_headlines
?>
http://www.bkjia.com/PHPjc/631791.html www.bkjia.com true http://www.bkjia.com/PHPjc/631791.html techarticle php function My_headlines ($url) {$RDF = Parse_url ($url); $fp = Fsockopen ($RDF [' Host '], N, $errno, $errstr,); (! $fp) {$content = "font class=" content "Problema!/font"; Retur ...