#!/usr/bin/php -q ]*>([^<]+)/", $feed, $matches) ) { foreach ($matches[1] as $title) { $i++; echo "*** $i $title\n"; } } /* ** Read all entries */ if (preg_match_all("/]+href='([^']+)'/", $feed, $matches) ) { foreach ($matches[1] as $link) { $i++; echo "*** $i $link\n"; $entry=curlToHost($link, 'GET', $headers); echo "$entry\n\n"; } } ?>