cURL Help Login Form

Discussion in 'PHP' started by DjZoC, May 2, 2012.

  1. #1
    Hello, i need some help with the CURL, i make the script but i have some problem hope someone can show me how to do ...

    I want to login in some website via CURL but they ask me some Questions example 2+3=? ... and every time the question is change (example when you refresh the page) how i can make the CURL to get that question first and after post the field + submit just with one request ?

    Thank you
     
    DjZoC, May 2, 2012 IP
  2. infotripro

    infotripro Member

    Messages:
    26
    Likes Received:
    2
    Best Answers:
    1
    Trophy Points:
    43
    #2
    You can't, those questions are to avoid such login (you have to prove that you're a human not a script)
     
    infotripro, May 3, 2012 IP
  3. DjZoC

    DjZoC Member

    Messages:
    167
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    41
    #3
    Hello there, i didnt ask if is working or not, sure is working ... just dont find the right way to make this ... anyway who can make this just PM me and i will pay you for this.

    Ro: Numi spune ca nu merge asa ceva ca sigur merge, in internet merge orce sa faci, cat timp stii ce trebuie sa faci
     
    DjZoC, May 3, 2012 IP
  4. -bank-

    -bank- Well-Known Member

    Messages:
    674
    Likes Received:
    37
    Best Answers:
    0
    Trophy Points:
    120
    #4
    Request the login page then process the login at the same time, so you scrape the content to where it says x + y =, remove the whitespaces execute the sum in php and get it to submit in the curl post fields. It can be done, although (based on personal skill levels) would take a while to complete.
     
    -bank-, May 18, 2012 IP
  5. iMarcus

    iMarcus Active Member

    Messages:
    122
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    90
    #5
    Thats a nice solution, grab the html element containing the math, use str_replace(" ","",$element) then execute! I guess you could use something similar for those "Whats the capital of France?" type questions, by looking up in a database.
    Thanks.
     
    iMarcus, May 24, 2012 IP
  6. HostPlanz

    HostPlanz Well-Known Member

    Messages:
    449
    Likes Received:
    34
    Best Answers:
    4
    Trophy Points:
    130
    #6
    I did this already using file_get_contents(); to read the page. Then I wrote code to pull the two digits out from the full page content, read what operator was being used (+, -, *, /) and made the calculation based on that.
     
    HostPlanz, May 24, 2012 IP