Curl REFERER problem

Discussion in 'PHP' started by nastynappy, Aug 31, 2008.

  1. #1
    I have a project, in which, I need to fetch re captcha, so that user may enter the re-captcha 's string and submit a form
    re-captcha gives an auth key, which only works for the domain it was issued for.
    I tried CURLOPT_REFERER and set it to the website's URL in which captcha is displayed.
    but it doesnt work.
    it only works on localhost ( which doesnt need any auth key )
    is there anyway I can do it ??
    is there any way I can manipulate the hostname of the server running script to be set to Source website's hostname ?
    like if i am running the script from my own server, i-e : mydomain.com/script.php
    can I make it send the hostname to re-captcha server as sourcedomain.com ??

    Please help. I really need help
     
    nastynappy, Aug 31, 2008 IP
  2. matthewrobertbell

    matthewrobertbell Peon

    Messages:
    781
    Likes Received:
    35
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Why not just apply for a new key for your domain, they're free, aren't they?
     
    matthewrobertbell, Aug 31, 2008 IP
  3. nastynappy

    nastynappy Banned

    Messages:
    499
    Likes Received:
    16
    Best Answers:
    0
    Trophy Points:
    0
    #3
    well , thanks for reply, but it isnt helpful.
    Read the main post again please..
     
    nastynappy, Sep 2, 2008 IP
  4. matthewrobertbell

    matthewrobertbell Peon

    Messages:
    781
    Likes Received:
    35
    Best Answers:
    0
    Trophy Points:
    0
    #4
    You can probably modify the php source recaptcha give you, but i bet they check which domain has sent it.
     
    matthewrobertbell, Sep 2, 2008 IP
  5. nastynappy

    nastynappy Banned

    Messages:
    499
    Likes Received:
    16
    Best Answers:
    0
    Trophy Points:
    0
    #5
    I think you didnt get my point :

    I said fetch re captcha on my own script's page , so that my client could enter the string and fill up the name password boxes and hit submit

    only problem is, curl referrer isnt passing the info required by recaptcha.net
    i put referrer as the SOURCEWEBSITE.com/register , so that , it looks like captcha is being fetched at sourcewebsite.com , but it isnt working, it by some method , finds out exactly who is fetching captcha.
    so, I need a way to disguise the hostname , thats all
    it doesnt include installing their library or auth key
     
    nastynappy, Sep 2, 2008 IP