之前在網路上找到的資料,提供給大家參考^^

運用ColdFuion呼叫Google Search API(web Service)實作.

來抓取google Search的資料,

其實相當簡單.你只要按下面的三步驟,就可以完成..



第一步去申請一個google Search API Account

https://www.google.com/accounts/NewAccount?continue=http://api.google.com/createkey&followup=http://api.google.com/createkey

Google會寄給你一個Key.



第二步.用ColdFusion呼叫Google Search API



代碼:  

 



 

 

 

 

 

 

 

 

 

 



第三步.將查尋的結果輸出



 代碼: 

 

records: #aGoogleSearchResult.estimatedTotalResultsCount#

#aGoogleSearchResult.resultElements[idx].title#

#aGoogleSearchResult.resultElements[idx].summary#

 #aGoogleSearchResult.resultElements[idx].snippet#





引用自:台灣 Adobe / macromedia 使用者俱樂部論壇
arrow
arrow
    全站熱搜

    狼翔月影 發表在 痞客邦 留言(0) 人氣()