Buying [WTB] LOGIN by PHP CURL

Discussion in 'Programming' started by afimafis, Feb 17, 2012.

  1. #1
    Hi,

    I need some php code to be done.

    I need to login site by using following code:





    <?php


    function curl_download()


    {


    $url = 'https://twitter.com/sessions?phx=1';
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_HEADER, null);
    curl_setopt($ch, CURLOPT_NOBODY, null);
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
    curl_setopt($ch, CURLOPT_COOKIE, "/tmp/cookie");
    curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
    curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
    curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
    curl_setopt($ch, CURLOPT_POST, 1);
    curl_setopt($ch, CURLOPT_POSTFIELDS, "session%5Busername_or_email%5D=USERNAME&session%5Bpassword%5D=PASSWORD&scribe_log=%5B%5D&redirect_after_login=%2F");







    $data = curl_exec ($ch);
    $info = curl_getinfo($ch);
    print_r($info);


    print_r($data);
    curl_close($ch);




    echo $data;


    }


    print curl_download();


    ?>





    Payment Paypal
    Code : PHP CURL
    Offer: $10 USD.

    Let me know if you can do it by p.m and how long
     
    afimafis, Feb 17, 2012 IP
  2. okapy

    okapy Well-Known Member

    Messages:
    162
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    128
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #2
    Are you trying to login to twitter?

    It won't work this way, and $10 won't help you. Twitter has protection against this kind of logins. Your CURLOPT_POSTFIELDS is missing some fields that you couldn't just get from the page. Those field are dynamically generated by Javascript. Your request will be just ignored or you will get captcha.

    If you want to do it right, you need to use oAuth and API to do whatever you need to do with twitter.
    If you really, really need to break to the site this way, you need to simulate Javascript code execution on your php code and generate those missing fields. Then tomorrow twitter change 1 line of the site and your code will stop working.

    if you still really want it, I can get a developer to write a function for you that will do that. It will take him an hour, so $30.

    Michael.
     
    okapy, Feb 17, 2012 IP