I was using the script below to pull in wiki pages within my site. It doesn't seem to work any more. Can anyone help point out where the trouble is so I can try to fix it?


<?
function callback( $buffer ) {
$buffer = substr(
$buffer, strpos(
$buffer, '<!-- start content -->' ) );
$buffer = substr( $buffer, 0, strpos(
$buffer, '<div class="printfooter">' ) );
$buffer = str_replace( "/wiki/", "/wwwinfo/index.php?title=", $buffer );
$buffer = preg_replace( '/\(<i>http(.*)wiki.phtml(.*)<\/i>\)/', "", $buffer );
# <span class= 'urlexpansion'>(<i>http://en.wikipedia.org/w/wiki.phtml?title=Special:Newpages&amp;limit=500&amp;offset=0</i>)</span>
$buffer = '<b>This is an extract from <a href="http://www.wikipedia.org" target="_blank">
Wikipedia, the Free Encyclopedia</a></b><hr>' . $buffer; return $buffer; }

ob_start("callback");include 'http://en.wikipedia.org/wiki/' . $title;
ob_end_flush();
?>