dtz8044 2009-06-15 03:25
浏览 25

使用PHP / Curl的reCaptcha小部件

I'm looking to build a small script that can load reCaptcha images from another website. Seeing as the reCaptcha widget works using Javascript, is there anyway for one to capture the image generated using CURL?

  • 写回答

1条回答 默认 最新

  • duanan2732 2009-06-15 03:57
    关注

    First you have to detail what exactly you want to do a bit more. What is this other website you're getting the reCaptcha from?

    Technically, reCaptcha tokens are only valid on the domain that they're registered for. The reasons why are detailed here

    Signing up for a reCAPTCHA Key

    In order to use reCAPTCHA, you need a public/private API key pair. This key pair helps to prevent an attack where somebody hosts a reCAPTCHA on their website, collects answers from their visitors and submits the answers to your site. You can sign up for a key on the reCAPTCHA Administration Portal.

    Key Scope Your reCAPTCHA token is valid only at the domain you sign up for and any subdomains (due to the potential attack mentioned above). Some users require keys for multiple sites, for example, a development server and a production server or simply multiple sites hosted on the same server. Three techniques can be used to work around this:

    If one of your servers is "localhost" or "127.0.0.1", reCAPTCHA will not enforce the same-domain rule. Just use the same key as for the production server. Generate a key for a broader scope. For example, if your application is a.example.com and your test server is test.corp.example.com, generate a key for example.com. Generate a different key for each domain.

    source : http://recaptcha.net/apidocs/captcha/

    This sounds like what you're trying to do, is it your server?

    评论

报告相同问题?

悬赏问题

  • ¥15 关于#hadoop#的问题
  • ¥15 (标签-Python|关键词-socket)
  • ¥15 keil里为什么main.c定义的函数在it.c调用不了
  • ¥50 切换TabTip键盘的输入法
  • ¥15 可否在不同线程中调用封装数据库操作的类
  • ¥15 微带串馈天线阵列每个阵元宽度计算
  • ¥15 keil的map文件中Image component sizes各项意思
  • ¥20 求个正点原子stm32f407开发版的贪吃蛇游戏
  • ¥15 划分vlan后,链路不通了?
  • ¥20 求各位懂行的人,注册表能不能看到usb使用得具体信息,干了什么,传输了什么数据