1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Can php be used to retrieve G's keyword tool captcha?

Discussion in 'General Programming Chat' started by Viltedali, Aug 30, 2010.

  1. Viltedali

    Viltedali Regular Member

    Joined:
    Feb 10, 2008
    Messages:
    305
    Likes Received:
    32
    Location:
    Midwest-US
    I'm trying to get a script created that can retrieve stats from G's keyword tool, can php be used to retrieve G's keyword tool captcha?

    The captcha image would need to be retrieved from the keyword tool and shown on my site.

    I'm hoping to be able to retrieve the info from this keyword tool:

    PHP:
    https://adwords.google.com/select/KeywordToolExternal?forceLegacy=true
    If php can't do it, desktop programs such as Market S@mari can do it, would I need something written in c+ or whatever to get this functionality? And if so, I guess I could then just use a Windows server to host it?

    Thanks for any replies.
     
  2. MaDeuce

    MaDeuce Newbie

    Joined:
    Oct 24, 2008
    Messages:
    45
    Likes Received:
    16
    Location:
    Austin, TX
    I'm not a PHP guy, but I did glance at the page. A quick look at the source shows that the element <img src="KeywordToolCaptcha" alt="" id="kpVariationsTool-captchaImage"> in the web page is a jpeg image. Seems like you'd just grab that image, do your magic decoding, and then stuff the answer back into the element <input type="text" id="kpVariationsTool-captchaAnswer">. At least that's what I'd do with curl or the like. YMMV,.
     
    • Thanks Thanks x 1
  3. supparman

    supparman Newbie

    Joined:
    Jul 22, 2009
    Messages:
    28
    Likes Received:
    5
    PHP:
    <img src="hxxps://adwords.google.com/select/KeywordToolCaptcha" />
     
    • Thanks Thanks x 1
  4. Viltedali

    Viltedali Regular Member

    Joined:
    Feb 10, 2008
    Messages:
    305
    Likes Received:
    32
    Location:
    Midwest-US
    Thanks for the info. I'll give it to the coder tonight, she's looking at examples of dealing with the @dwords api.

    It looks like I may just buy the script here:

    PHP:
    hxxp://www.coderxo.com/adwordsTool.html
    The results don't look as nice as with the green graphics on Go0gle's old keyword tool page, but good enough I suppose.

    The Go0gle results are to be integrated with a domain generator, that's the plan at least.
     
  5. MaDeuce

    MaDeuce Newbie

    Joined:
    Oct 24, 2008
    Messages:
    45
    Likes Received:
    16
    Location:
    Austin, TX
    If you can find canned software that does what you need, it's usually the best option.

    One thing to keep in mind -- the google api will rate limit your software. In other words, you only get 'x' number of calls per hour and then they throttle you. The apis are great, but the rate limits are also their downfall in some instances. It all depends upon your use-case.

    This rate limit one reason that some people I know choose to screen scrape instead of use the api. While it's true that a screen scraper will get throttled too, they just rollover to a new proxy and then pick up where they left off Screen scraping is messier and more trouble, but some use-cases can't be supported under rate limits. I'm not advocating violating googles TOS, just passing along what I know.
     
  6. RottenYellow

    RottenYellow BANNED BANNED

    Joined:
    Sep 10, 2010
    Messages:
    68
    Likes Received:
    16
    Viltedali, I created a bot for google keyword tool, written in PHP a while back. I was able to get captcha with no problems. If you need help with this, I have the bot ready. It runs in command line (uses display command on linux to display the captcha), but it can easily be ported on windows.
     
    • Thanks Thanks x 1
  7. ytcommenter

    ytcommenter Power Member

    Joined:
    Feb 13, 2010
    Messages:
    624
    Likes Received:
    124
    You cannot do it with just php you should use c# for it
     
    • Thanks Thanks x 1
  8. RottenYellow

    RottenYellow BANNED BANNED

    Joined:
    Sep 10, 2010
    Messages:
    68
    Likes Received:
    16
    While C# might be a better choice, you can definitely do it all in just PHP. I'm interested why would you think otherwise?
     
  9. dannyhw

    dannyhw Senior Member

    Joined:
    Jul 16, 2008
    Messages:
    980
    Likes Received:
    462
    Occupation:
    Software Engineer
    Location:
    New York City Burbs
    It can be done in PHP pretty easily. Getting the actual data is way more of a pain than getting the captcha but it can be done once you figure it out. If you log into your adwords account first you don't get a captcha, so that's an option.

    And the API works, but it costs money to use. It's not *much* money, but it can add up if you're doing really bulk stuff.