How to show Google Search results embedded in my website?

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


Looking at the terms and services for Google CSE (at the time of writing this):

1.3 Your Obligations. You shall receive a Query from the End User and shall forward that Query to Google. You may not in any way frame, cache or modify the Results produced by Google, except as otherwise agreed to between You and Google.

Seems to imply that I have to show the search results in the standard google page and not my own. Will look at Bing.

Tags:

Html

Search