PHP
  Home arrow PHP arrow Page 2 - Create Your Own Search Engine with PHP and...
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
PHP

Create Your Own Search Engine with PHP and Google Web Services
By: Ahm Asaduzzaman
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 49
    2003-02-12

    Table of Contents:
  • Create Your Own Search Engine with PHP and Google Web Services
  • Interacting with Google's Web Services
  • Walkthrough Example
  • Conclusion

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Create Your Own Search Engine with PHP and Google Web Services - Interacting with Google's Web Services


    (Page 2 of 4 )

    Google has made only three methods available in their Web API. You will see soon that it’s just more than enough to build powerful applications.
    Here is what they look like:

    doGoogleSearch() – search for specified term in the Google database.
    doGetCachedPage() – retrieve a page cache from the Google cache.
    doSpellingSuggestion() – retrieve a spelling suggestion from Google.

    The above methods exposed by the Google’s Web Services make it possible to use number of very cool features – Web search, cached document retrieval, phrase correction – in a simple but extensible manner, which opens up very interesting new possibilities for Web developers. Pic. 1 shows how a client program invokes a method from Google’s Web Services. Let’s rock and roll.

    Pic. 1: Exchanging SOAP packets between the client and Google Web Services
    Pic. 1: Exchanging SOAP packets between the client and Google Web Services


    The skeleton of our client code (pseudo codes) will look something like following (Pic. 2):

    <?php
    if (!$_POST[‘query’])
    {
    //display form

    }

    else
    {
    //execute query on Google

    }

    Pic. 2: Code Skeleton

    As you can see, the script is split into two sections, one for the search form and the other for the search result. An "if" statement is used to decide which section of the script to execute.

    More PHP Articles
    More By Ahm Asaduzzaman


     

    PHP ARTICLES

    - Making Usage Statistics in PHP
    - Installing PHP under Windows: Further Config...
    - File Version Management in PHP
    - Statistical View of Data in a Clustered Bar ...
    - Creating a Multi-File Upload Script in PHP
    - Executing Microsoft SQL Server Stored Proced...
    - Code 10x More Efficiently Using Data Access ...
    - A Few Tips for Speeding Up PHP Code
    - The Modular Web Page
    - Quick E-Commerce with PHP and PayPal
    - Regression Testing With JMeter
    - Building an Iterator with PHP
    - PHP Frontend to ImageMagick
    - Using PEAR's mimeDecode Module
    - Incoming Mail and PHP







    © 2003-2010 by Developer Shed. All rights reserved. DS Cluster 11 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek