(.+?)%is"; $urlparts = parse_url($url); if ($urlparts[path] == "") $url .= "/"; $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_TIMEOUT, 8); $data = curl_exec($ch) or die("Error reading RSS data."); curl_close($ch); $match_count = preg_match_all($itemregexp, $data, $items); $match_count = ($match_count > $nritems) ? $nritems : $match_count; for ($i=0; $i< $match_count; $i++) { $body = $items[1][$i]; preg_match ("%rssi1 *\" *>(.+?)"); $desc = substr(trim(strip_tags($desc)),0,54); $desc = substr($desc, 0, strrpos($desc, " ")) . " ..."; $desc = htmlentities($desc); if ($ds== "y") { $output .= "document.write(\"

"; if ($ds== "y") { $output .= htmlentities($title) ."
\")\n"; $output .= "document.write(\"". $desc ."

\")\n"; } else { $output .= htmlentities($title) ."\")\n"; } } print "
\n";
    print htmlspecialchars($output);
    print "
\n"; print "
"; } function get_link($body, $url) { if (stristr($body, "rssi2\" href")) { $linkurl = stristr($body, "rssi2\" href"); $linkurl = substr($linkurl, strpos($linkurl, "\"")+1); $linkurl = substr($linkurl, strpos($linkurl, "\"")+1); $linkurl = substr($linkurl, 0, strpos($linkurl, "\"")); $linkurl = trim($linkurl); return $linkurl; } else { return $url; } } parse_html($url, $ds, $nritems); ?>

Enter the URL of the page you want to summarize:
(include http:// and a final "/" or a filename)

Number of items:
with first lines without