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 8451679
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T11:18:17+00:00 2026-06-10T11:18:17+00:00

I want to scrape some google page with file get contents function: $encoded=’http://www.google.co.il/#hl=en&biw=1440&bih=799&sclient=psy-ab&q=site:’.urlencode(http://stackoverflow.com/); echo

  • 0

I want to scrape some google page with file get contents function:

     $encoded='http://www.google.co.il/#hl=en&biw=1440&bih=799&sclient=psy-ab&q=site:'.urlencode("http://stackoverflow.com/");

    echo  file_get_contents($encoded);

When I do this:

echo $encoded;

I get this:

http://www.google.co.il/#hl=en&biw=1440&bih=799&sclient=psy-ab&q=site:http%3A%2F%2Fstackoverflow.com%2F

When I put it in the url.. I get the page that I want

But when I use the function , I simply get the main google page..why does this happen?

  • 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-06-10T11:18:18+00:00Added an answer on June 10, 2026 at 11:18 am

    It’s because you url uses googles new client side side functionality. Everything after the # is for the client, and the server will serve you the content under http://www.google.co.il/.

    update

    If you want to use google search results in your program, try using one of their API for custom search. There have been a search webservice for ajax clients under the this url:

    http://ajax.googleapis.com/ajax/services/search/web?v=1.0&q=your+term+goes+here
    

    It returns results in JSON, the first result is under responseData->results array:

    $search_results = json_decode(file_get_contents('http://ajax.googleapis.com/ajax/services/search/web?v=1.0&q=your+term+goes+here'), true);
    var_export($search_results['responseData']['results'][0]);
    

    But i think this have been deprecated since than (still responds however).

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

Sidebar

Related Questions

I want to scrape this URL : https://www.xstreetsl.com/modules.php?searchSubmitImage_x=0&searchSubmitImage_y=0&SearchLocale=0&name=Marketplace&SearchKeyword=business&searchSubmitImage.x=0&searchSubmitImage.y=0&SearchLocale=0&SearchPriceMin=&SearchPriceMax=&SearchRatingMin=&SearchRatingMax=&sort=&dir=asc Go into each of the links
I want to scrape a website page and then save some of the information
I want to scrape some information off a football (soccer) web page using simple
i want to scrape the top 10 search links from a google page on
Given a parent URL (say http://dir.yahoo.com/News_and_Media/ ), I want to scrape all URLs which
I want to scrape some tables of average house rents in Wellington, New Zealand.
I want to scrape string data from some binary text files that contain embedded
I want to scrape some html pages that have nested form elements with lxml.
Basically, I want to scrape some options data daily from Yahoo! Finance. I have
i am trying to scrape some data from this site : http://laperuanavegana.wordpress.com/ . actually

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.