$source
($date)
$summary



";
}
}
}
############################################
if ($goweb) {
$bar = "http://search.yahooapis.com/WebSearchService/V1/webSearch?results=10&start=$page&appid=bassfishing&query=$q®ion=us&format=html";
$bar = file_get_contents($bar);
$p = xml_parser_create();
xml_parse_into_struct($p, $bar, $values, $tags);
xml_parser_free($p);
$data = XMLToArray($values);
$totalfound = ($totalfound + $values[0][attributes][TOTALRESULTSAVAILABLE]);
$x = $values[0][attributes][FIRSTRESULTPOSITION];
$x++;
$results = $data[RESULTSET][RESULT];
$x = 0;
if(is_array($results)) {
while (list($k,$v)=each($results)) {
$summary = $v[SUMMARY];
$title = $v[TITLE];
$web .= "u $title

$summary

" . sprintf("%.30s", $v[URL]) . "...


l OPEN RESULT in a NEW WINDOW
l TEXT ONLY VERSION of this WEB PAGE
l Is this SITE in the GOOGLE ACCESSIBLE INDEX
l SIMILAR PAGES to this RESULT from GOOGLE



";
}
}
}
############################################
if ($goimages) {
$bar = "http://api.search.yahoo.com/ImageSearchService/V1/imageSearch?appid=bassfishing&query=$q&results=20";
$bar = file_get_contents($bar);
$p = xml_parser_create();
xml_parse_into_struct($p, $bar, $values, $tags);
xml_parser_free($p);
$data = XMLToArray($values);
$totalfound = ($totalfound + $values[0][attributes][TOTALRESULTSAVAILABLE]);
$x = $values[0][attributes][FIRSTRESULTPOSITION];
$x++;
$results = $data[RESULTSET][RESULT];
$x = 0;
if(is_array($results)) {
while (list($k,$v)=each($results)) {
$alt = $v[SUMMARY];
$title = $v[TITLE];
$target = $v[URL];
unset($img);
if(is_array($v[THUMBNAIL])) {
while (list($a,$b)=each($v[THUMBNAIL])) {
$img = $b[URL];
$hei = $b[HEIGHT];
$wid = $b[WIDTH];
}
}
if ($img) {
$images .= "
";
}
}
}
}
############################################
}
if ($totalfound) {
$pages = round($totalfound / 10);
if ($totalfound == 1) {
print "1 result found: ";
} else {
print number_format($totalfound) . " Results Found for: $_GET[q] ";
}
if ($pages > 20) {
$pages = 20;
}
while ($y < $pages) {
$y++;
$chunk .= "";
if ($y == $page) {
$chunk .= "$y
";
} else {
$chunk .= "$y
";
}
$chunk .= " ";
}
print "
";
if ($images) {
$table_headers[1] = "Top 20 Images";
$table_stats[1] = " valign=\"top\" width=\"136\" align=\"center\" BGCOLOR=\"#000000\" ";
$table_body[1][1] = "$images";
}
if ($web) {
$table_headers[2] = "Web Results";
$table_stats[2] = " valign=\"top\" width=\"65%\"BGCOLOR=\"#252525\" ";
$table_body[1][2] = "$web";
}
if ($news) {
$table_headers[3] = "News";
$table_stats[3] = " valign=\"top\" width=\"35%\" BGCOLOR=\"#252525\" ";
$table_body[1][3] = "$news";
}
print "