Well, you've repaid the favour...
Assuming your code is based on the standard php code, you will have something like: -
PHP Code:
for ($i = 1; $i <= $resultset["NUMRESULTS"]; $i++) {
$title = array_shift($Atitle);
$abstract = array_shift($Aabstract);
$redir = array_shift($Aredir);
$url = array_shift($Aurl);
displayResult($i, $title, $abstract, $redir, $url);
}
Change this to: -
PHP Code:
$shown=0;
for ($i = 1; $i <= $resultset["NUMRESULTS"]; $i++) {
$title = array_shift($Atitle);
$abstract = array_shift($Aabstract);
$redir = array_shift($Aredir);
$url = array_shift($Aurl);
if ( ($shown<3) && (strpos($url,'badsite1.com')===false) && (strpos($url,'badsite2.co.uk')===false) ) {
displayResult($shown+1, $title, $abstract, $redir, $url);
$shown++;
}
}
That will ensure it skips any results that have badsite1.com or badsite2.com anywhere in their Url. To help ensure you get 3 results to show, you really need to request more, say 5. Some where in your script you should have $nres = 3 or nres=3 in a url, change that to 5 and you should be sorted.