Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3342692
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T00:52:07+00:00 2026-05-18T00:52:07+00:00

How get google search results url? (I use Zend_Gdata_Gbase for get search google results

  • 0

How get google search results url?

(I use Zend_Gdata_Gbase for get search google results and not DomDocument/htmlsimpleparser because its looks to me that Zend_Gdata_Gbase done specially for parsing google results.
if I wrong in my selection, please write.)

My function to get google search results for ‘yahoo’ or other query search string:
(the function get a feed that should have search result for word ‘yahoo’, but when i use prin_t($feed) I don’t see url for each result)

<?php    
function queryGoogleSearch($queryString='yahoo'){
            $service = new Zend_Gdata_Gbase();
            $query = $service->newSnippetQuery();
            $query->setBq('['.$queryString.']');
            $query->setOrderBy('modification_time');
            $query->setSortOrder('descending');
            $query->setMaxResults('4');
            $feed = $service->getGbaseSnippetFeed($query);
            return $feed; 
    }
    print_r(queryGoogleSearch());
?>

I get 4 first url results (when I search manually in google):

http://www.yahoo.com, mail.yahoo.com, search.yahoo.com, maps.yahoo.com

But I can’t find them when I print $feed variable.

Please what should i change or add inqueryGoogleSearch() function? (Or other better code)

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T00:52:08+00:00Added an answer on May 18, 2026 at 12:52 am

    Are you trying to search google.com. Looks like that class is for Google Base, not google.com search engine. http://base.google.com/support/bin/answer.py?hl=en&answer=59260

    You probably want this: http://code.google.com/apis/customsearch/v1/overview.html
    They recently just changed this. The old google search API has now deprecated as of Nov 1st. Custom search is the new API.

    Its pretty simple to use without Zend.

    http://code.google.com/apis/customsearch/v1/using_rest.html#WorkingResults

    There is a JSON decoder in PHP.
    http://php.net/manual/en/function.json-decode.php

    Hope that helps!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to get google search results to show in my android app. How
How can I get Google search results from inside a program? I need to
What do I need to use to get a search listing using the google
I need to find a way to create get the Google search results page
I wrote a tool in C# that RETURN the search results in Google Search.
Im trying to write a script that gets google's ajax search results (For example:
I'm using google custom search to get image results. This is my first test
I'm trying to get google search results using HTML Agility Pack, but I am
I am trying to extract URLs from Google search results. I use Indy IdHTTP
If i search in google with a keyword, i get many results. I need

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.