0 && is_numeric($first))
{
$beg .='&first=' . $first;
$next=(int)$first + 10;
}
else
{
$next='11';
}
$query=str_replace('/','',$query);
$query=str_replace(' ','+',$query);
$query=str_replace('\\"','%22',$query);
$res=fopen('http://search.msn.com/results.aspx?q='.$query .$beg,'r');
while ($line = fgets ($res))
$xml .= $line;
$buf .= XtDataWithFile($xml,'/var/www/msn.xsl');
$buf=str_replace('
','next',$buf);
echo($buf);
function XtDataWithFile($xmlData, $uriXSLT) {
$args = array ( '/_xml' => $xmlData );
$xp = xslt_create();
$out = xslt_process($xp, 'arg:/_xml', $uriXSLT, NULL, $args);
xslt_free($xp);
return $out;
}
?>