I am using this code in my website to show Google search results for my website :
<!-- Search block -->
<div class="searchBox">
<form method="get" action="http://www.google.com/search">
<input type="text" name="query" class="searchField" />
<input type="hidden" name="sitesearch" value="my_website.com">
<input type="submit" value="" class="searchSubmit">
</form>
</div>
I like that simple code and i do not prefer to use Google Custom Search, but is there a way to show the output of this search embedded in a page i specify ?
Bing has a much better terms of use and an excellend API when it comes to site search integration.
It lets you take the XML that is returned and pretty much do whatever you want with it as long as you reference that your search is being powered by Bing somewhere in the result list.
Checkout my post here http://www.foliotek.com/devblog/integrating-bing-search-results-within-a-web-app-using-net/.
As far as Google results your only option is to use there built in frameing. The fully custom search cost were super high when I looked to do it behind SSL. For more information on Google Custom Search go here http://www.google.com/cse/.
Real World Bing Example A: http://www.mshsaa.org/Search/?q=basketball
You could read the content from the page with file_get_contents
and than read out the parts you need and display them on your page.
http://php.net/manual/en/function.file-get-contents.php
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With