Google API HELP NEEDED!

Discussion in 'PHP' started by thatsfine, Mar 23, 2010.

  1. #1
    Hello,

    I am making an application in which the user will search a term which will get the results from google search engine. Thats quite easy. But what i want is that when the user will click on the result he will go to the site but from my page like.

    The search result is:

    Google (this goes to http://google.com)
    Enables users to search the Web, Usenet, and images. Features include PageRank, caching and translation of results, and an option to find similar pages.
    www.google.com/ - Cached - Similar

    What i want is:
    Google (this should go to http://site.com/mypage.php?site=google.com)
    Enables users to search the Web, Usenet, and images. Features include PageRank, caching and translation of results, and an option to find similar pages.
    www.google.com/ - Cached - Similar


    This is easily possibile by using Google SOAP API.


    echo "<td><span class='list'>".($i+$begin).".</span> <a href='http://site.com/mypage.pgp?site=$url' class='link'>$title</a><br><span class='gray_small'>$snippet</span><br><a href='$url' class='link_small'>$url</a></td></tr>\n";

    But unfortunately it is not available anymore.

    I am not sure how this will be done using Google AJAX API which is used now a day's...

    Please tell me what should i do?

    Thanks and Regards

     
    thatsfine, Mar 23, 2010 IP
  2. iandracaster

    iandracaster Peon

    Messages:
    8
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Try this:




    Good Luck ....
     
    iandracaster, Mar 29, 2010 IP
  3. thatsfine

    thatsfine Notable Member

    Messages:
    1,469
    Likes Received:
    29
    Best Answers:
    0
    Trophy Points:
    250
    #3
    @iandracaster - It does'nt work out...

    It shows a blank page.....

    Thanks for your help...
     
    thatsfine, Mar 31, 2010 IP
  4. thatsfine

    thatsfine Notable Member

    Messages:
    1,469
    Likes Received:
    29
    Best Answers:
    0
    Trophy Points:
    250
    #4
    Thanks, I will use Yahoo Search API instead.

    Thanks again!
     
    thatsfine, Mar 31, 2010 IP
  5. iandracaster

    iandracaster Peon

    Messages:
    8
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    not sure what is missing in your code, but in case you want to use google API again, i'll just give you the complete simple code, the rest of the customize functionality, you can find it in google API documentation. Before you use this API, you have to sign up for API key at http://code.google.com/apis/ajaxsearch/signup.html



    :)
     
    iandracaster, Apr 1, 2010 IP