如何显示嵌入在我的网站中的Google搜索结果? [英] How to show Google Search results embedded in my website?

查看:109
本文介绍了如何显示嵌入在我的网站中的Google搜索结果?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在我的网站中使用此代码来显示我的网站的Google搜索结果:

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>  

我喜欢那个简单的代码,并且我不喜欢使用 Google自定义搜索,但是在那里一种显示嵌入我指定的页面中的搜索结果的方法?

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使用条款更好,并且具有出色的API.

Bing has a much better terms of use and an excellend API when it comes to site search integration.

它允许您获取返回的XML,并且只要您引用搜索在结果列表中的某处由Bing提供动力,就可以执行几乎任何您想使用的XML.

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.

在此处查看我的帖子 http://www.foliotek.com/devblog/integrating-bing-search-results-within-a-web-app-using-net/.

Checkout my post here http://www.foliotek.com/devblog/integrating-bing-search-results-within-a-web-app-using-net/.

就Google而言,您唯一的选择是使用内置的框架.当我打算在SSL之后进行完全自定义搜索时,成本非常高.有关Google自定义搜索的更多信息,请访问 http://www.google.com/cse/.

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/.

真实世界Bing示例A: http://www.mshsaa.org/Search/? q =篮球

Real World Bing Example A: http://www.mshsaa.org/Search/?q=basketball

这篇关于如何显示嵌入在我的网站中的Google搜索结果?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆