I have this custom search engine powered by Yahoo Search BOSS
I got it from this page:
http://johnmccollum.co.uk/2008/07/31/how-to-build-search-into-your-site-with-jquery-and-yahoo/
My code is:
getresult.php
<HTML><BODY><PRE style="word-wrap: break-word; white-space: pre-wrap;"><?php
$appid = ''; //q6KQXb_V34FGIku1Whw9ymQOLLQDqHmpvRAD_JgVRgNofr.Tibvp4lzqMUz54IAwWtVpwaR04zL66I5C7b63
$query = $_POST['query'];
$url = 'http://movieat.co.cc' . $query . '?appid=' . $appid;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
$result = curl_exec($ch);
$result = json_decode($result);
$out = "";
for($i=0; $i<10; ++$i)
{
$out .= '<p><a href="'.$result->ysearchresponse->resultset_web[$i]->clickurl;
$out .= '">' . $result->ysearchresponse->resultset_web[$i]->title . '</a>';
$out .= ' - '. $result->ysearchresponse->resultset_web[$i]->abstract;
$out .= '</p>';
}
echo $out;
curl_close($ch);
?>
</PRE></BODY></HTML>
This is called within a div called results, it shows a bunch of code?
This is also used with jQuery....
Can someone help me fix this problem and show the results instead of the php code?
Thanks