How to get the source of a Google page?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Jakez
    Confirmed User
    • Jan 2004
    • 5656

    #1

    How to get the source of a Google page?

    Tried grabbing the source of a search page using file_get_contents() to get some keyword positioning data and it return this:



    Lame Google.. Lame
    Last edited by Jakez; 10-28-2009, 05:05 PM.
    [email protected] - jakezdumb - 573689400

    Killuminati
  • woj
    <&(©¿©)&>
    • Jul 2002
    • 47880

    #2
    curl + proxies FTW
    Custom Software Development, email: woj#at#wojfun#.#com to discuss details or skype: wojl2000 or gchat: wojfun or telegram: wojl2000
    Affiliate program tools: Hosted Galleries Manager Banner Manager Video Manager
    Wordpress Affiliate Plugin Pic/Movie of the Day Fansign Generator Zip Manager

    Comment

    • cyco_cc
      Confirmed User
      • Oct 2008
      • 344

      #3
      You don't need to use a proxy. Google's probably just validating against your User Agent. Change the User Agent that is being sent with the request and you'll be fine.

      Comment

      • Jakez
        Confirmed User
        • Jan 2004
        • 5656

        #4
        Tried curl and sent the following:
        curl_setopt( $ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:1.7.3) Gecko/20041001 Firefox/0.10.1" );

        but I get the same response, wtf..
        [email protected] - jakezdumb - 573689400

        Killuminati

        Comment

        • Jakez
          Confirmed User
          • Jan 2004
          • 5656

          #5
          Wow I need to pay attention to where I'm ending up in searches, posted this shit in the sell and buy forum lol.
          [email protected] - jakezdumb - 573689400

          Killuminati

          Comment

          • Cyber Fucker
            Hmm
            • Sep 2005
            • 12642

            #6
            Weird, I've got no problem to grab it.. with ff 2.0

            Comment

            • Jakez
              Confirmed User
              • Jan 2004
              • 5656

              #7
              Changed this in php.ini:
              ; Define the User-Agent string
              ;
              user_agent="PHP"
              to
              ; Define the User-Agent string
              ;
              user_agent="Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.9) Gecko/20071025 Firefox/2.0.0.9"
              Works now..
              [email protected] - jakezdumb - 573689400

              Killuminati

              Comment

              Working...