最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
用Flash 进行Google
时间:2022-07-02 19:44:57 编辑:袖梨 来源:一聚教程网
演示:
当 SOAP的来临和 XML等相似的到来一样 , 站点开发者可以非常容易的从不同的来源提供其他站的更多信息。
为了增加这种方便,许多不同的Web服务提供了API,诸如Google, Amazon, ebay 以及一些你所知道的名字。
Google作为我最喜爱的搜索引擎(以及数百万个互联网网用户的), Flash是我的生计工具,这个想法就是建立一个环境可以使Flash能使用Google并且在该Flash中输出结果。
基本需求:
我们需要以下东西建立这个产品
Flash MX
PHP 并有XML支持
Nusoap(PHP小组一种,允许开发者建立使用 SOAP网页服务)
A Google API 账户(可以在这里获得)
我在这里将不打算介绍SOAP的细节以及如何使用它。在线帮助已经有足够的数据了。无论如何,对XML和它的各种各样的同胞的熟悉是我从读者那里期望的全部。无论如何,我期望读者们能够阅读它。
不过,通过Nusoap 访问Google之后我将大力推荐在Devshed上的这篇文章。
制作步骤
第一步,建立一个PHP文件连接到Google,并在Flash环境中获得搜索结果。下面是该文件的原代码。
这个过程很容易使用Nusoap实现。
//Initialize PHP
//include the nusoap class..(http://dietrich.*g**anx4.com/nusoap/)
include_once($document.ROOT.“/../scripts/nusoap/nusoap.php“);
/*prints the results of the search in a swf file
as an array structure to hold ready made data for */
function google2Flash($searchStr, $startParam=0){
if(empty($searchStr)) {
expirationHeaders();
return;
}//end if
// create an instance of the SOAP client object
// remember that this script is the client,
// accessing the web service provided by Google
$soapclient = new soapclient(“http://api.*go**ogle.com/search/beta2“;);
setType($startParam, “integer“);
$maxResults = 10; //Google Limit :(
当 SOAP的来临和 XML等相似的到来一样 , 站点开发者可以非常容易的从不同的来源提供其他站的更多信息。
为了增加这种方便,许多不同的Web服务提供了API,诸如Google, Amazon, ebay 以及一些你所知道的名字。
Google作为我最喜爱的搜索引擎(以及数百万个互联网网用户的), Flash是我的生计工具,这个想法就是建立一个环境可以使Flash能使用Google并且在该Flash中输出结果。
基本需求:
我们需要以下东西建立这个产品
Flash MX
PHP 并有XML支持
Nusoap(PHP小组一种,允许开发者建立使用 SOAP网页服务)
A Google API 账户(可以在这里获得)
我在这里将不打算介绍SOAP的细节以及如何使用它。在线帮助已经有足够的数据了。无论如何,对XML和它的各种各样的同胞的熟悉是我从读者那里期望的全部。无论如何,我期望读者们能够阅读它。
不过,通过Nusoap 访问Google之后我将大力推荐在Devshed上的这篇文章。
制作步骤
第一步,建立一个PHP文件连接到Google,并在Flash环境中获得搜索结果。下面是该文件的原代码。
这个过程很容易使用Nusoap实现。
//Initialize PHP
//include the nusoap class..(http://dietrich.*g**anx4.com/nusoap/)
include_once($document.ROOT.“/../scripts/nusoap/nusoap.php“);
/*prints the results of the search in a swf file
as an array structure to hold ready made data for */
function google2Flash($searchStr, $startParam=0){
if(empty($searchStr)) {
expirationHeaders();
return;
}//end if
// create an instance of the SOAP client object
// remember that this script is the client,
// accessing the web service provided by Google
$soapclient = new soapclient(“http://api.*go**ogle.com/search/beta2“;);
setType($startParam, “integer“);
$maxResults = 10; //Google Limit :(
相关文章
- 逆战未来机甲排位模式怎么玩 09-17
- 物华弥新睡莲有什么玩法技巧 09-17
- 地下城堡4骑士与破碎编年史沃辛达如何通关 09-17
- 星痕共鸣吉他手流派怎么选择 09-17
- 失控进化如何建船坞基地 09-17
- 崩坏星穹铁道丹恒腾荒怎么免费领-丹恒腾荒免费领取方法 09-17