Qiwi curl authorisation



  • There's a violin, today I checked, after the authorization, 301 Moved Permanently, maybe who knows the solution.

    <?php
    $U_LOGIN = "+7**********";
    $U_PASS = "";
    $cookie_file = "cookie.txt";
    

    $ch = curl_init();
    $arr = array("login" => $U_LOGIN,"password" => $U_PASS);
    $post = json_encode($arr);
    $url="https://auth.qiwi.com/cas/tgts?".$post;

    curl_setopt($ch, CURLOPT_HEADER, 0);
    curl_setopt($ch, CURLOPT_TIMEOUT, 30);
    curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.132 Safari/537.36');
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
    curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
    curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 1);
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
    curl_setopt($ch, CURLOPT_HTTPHEADER, array());
    curl_setopt($ch, CURLOPT_HTTPHEADER, array ('Accept: application/vnd.qiwi.sso-v1+json','Accept-Language: ru;q=0.8,en-US;q=0.6,en;q=0.4','Content-Type: application/json; charset=UTF-8','Accept-Encoding: gzip, deflate','X-Requested-With: XMLHttpRequest'));
    curl_setopt($ch, CURLOPT_REFERER, 'https://visa.qiwi.com/main.action');
    curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie_file);
    curl_setopt($ch, CURLOPT_COOKIEFILE, $cookie_file);
    $html = curl_exec($ch);
    $page = json_decode($html, true);
    $arr = array("ticket" => $page['entity']['ticket'],"service" => "https://visa.qiwi.com/j_spring_cas_security_check");
    $post = json_encode($arr);

    $url="https://auth.qiwi.com/cas/sts?".$post;

    curl_setopt($ch, CURLOPT_HEADER, 0);
    curl_setopt($ch, CURLOPT_TIMEOUT, 30);
    curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.132 Safari/537.36');
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
    curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
    curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 1);
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
    curl_setopt($ch, CURLOPT_HTTPHEADER, array());
    curl_setopt($ch, CURLOPT_HTTPHEADER, array ('Accept: application/vnd.qiwi.sso-v1+json','Accept-Language: ru;q=0.8,en-US;q=0.6,en;q=0.4','Content-Type: application/json; charset=UTF-8','Accept-Encoding: gzip, deflate','X-Requested-With: XMLHttpRequest'));
    curl_setopt($ch, CURLOPT_REFERER, 'https://auth.qiwi.com/app/proxy?v=1');
    curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie_file);
    curl_setopt($ch, CURLOPT_COOKIEFILE, $cookie_file);
    $html = curl_exec($ch);
    $arr = array("service" => "https://visa.qiwi.com/j_spring_cas_security_check","ticket" => $page['entity']['ticket']);
    $post = json_encode($arr);

    $url="https://auth.qiwi.com/cas/sts?".$post;

    curl_setopt($ch, CURLOPT_HEADER, 0);
    curl_setopt($ch, CURLOPT_TIMEOUT, 30);
    curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.132 Safari/537.36');
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
    curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
    curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 1);
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
    curl_setopt($ch, CURLOPT_HTTPHEADER, array());
    curl_setopt($ch, CURLOPT_HTTPHEADER, array ('Accept: application/vnd.qiwi.sso-v1+json','Accept-Language: ru;q=0.8,en-US;q=0.6,en;q=0.4','Content-Type: application/json; charset=UTF-8','Accept-Encoding: gzip, deflate','X-Requested-With: XMLHttpRequest'));
    curl_setopt($ch, CURLOPT_REFERER, 'https://visa.qiwi.com/');
    curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie_file);
    curl_setopt($ch, CURLOPT_COOKIEFILE, $cookie_file);
    $html = curl_exec($ch);
    $page = json_decode($html, true);
    $url="https://visa.qiwi.com/j_spring_cas_security_check?ticket=".$page["entity"]["ticket"];

    curl_setopt($ch, CURLOPT_HEADER, 0);
    curl_setopt($ch, CURLOPT_TIMEOUT, 30);
    curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.132 Safari/537.36');
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_POST, 0);
    curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
    curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 1);
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
    curl_setopt($ch, CURLOPT_HTTPHEADER, array());
    curl_setopt($ch, CURLOPT_REFERER, 'https://visa.qiwi.com/');
    curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie_file);
    curl_setopt($ch, CURLOPT_COOKIEFILE, $cookie_file);
    $html = curl_exec($ch);

    $url="https://visa.qiwi.com/report/list.action?type=3";
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 1);
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_REFERER, 'https://visa.qiwi.com/main.action');
    curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
    curl_setopt($ch, CURLOPT_POST, 0);
    curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie_file);
    curl_setopt($ch, CURLOPT_COOKIEFILE, $cookie_file);
    $html = curl_exec($ch);
    echo $html;
    curl_close($ch);

    ?>



  • <?php
    $U_LOGIN = "+***";
    $U_PASS = "***";
    $cookie_file = "cookie.txt";
    

    $ch = curl_init();
    $arr = array("login" => $U_LOGIN,"password" => $U_PASS);
    $post = json_encode($arr);
    $url="https://auth.qiwi.com/cas/tgts?".$post;

    curl_setopt($ch, CURLOPT_HEADER, 0);
    curl_setopt($ch, CURLOPT_TIMEOUT, 30);
    curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.132 Safari/537.36');
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
    curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
    curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 1);
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
    curl_setopt($ch, CURLOPT_HTTPHEADER, array());
    curl_setopt($ch, CURLOPT_HTTPHEADER, array ('Accept: application/vnd.qiwi.sso-v1+json','Accept-Language: ru;q=0.8,en-US;q=0.6,en;q=0.4','Content-Type: application/json; charset=UTF-8','Accept-Encoding: gzip, deflate','X-Requested-With: XMLHttpRequest'));
    curl_setopt($ch, CURLOPT_REFERER, 'https://qiwi.com/main.action');
    curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie_file);
    curl_setopt($ch, CURLOPT_COOKIEFILE, $cookie_file);
    $html = curl_exec($ch);
    $page = json_decode($html, true);
    $arr = array("ticket" => $page['entity']['ticket'],"service" => "https://qiwi.com/j_spring_cas_security_check");
    $post = json_encode($arr);

    $url="https://auth.qiwi.com/cas/sts?".$post;

    curl_setopt($ch, CURLOPT_HEADER, 0);
    curl_setopt($ch, CURLOPT_TIMEOUT, 30);
    curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.132 Safari/537.36');
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
    curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
    curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 1);
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
    curl_setopt($ch, CURLOPT_HTTPHEADER, array());
    curl_setopt($ch, CURLOPT_HTTPHEADER, array ('Accept: application/vnd.qiwi.sso-v1+json','Accept-Language: ru;q=0.8,en-US;q=0.6,en;q=0.4','Content-Type: application/json; charset=UTF-8','Accept-Encoding: gzip, deflate','X-Requested-With: XMLHttpRequest'));
    curl_setopt($ch, CURLOPT_REFERER, 'https://auth.qiwi.com/app/proxy?v=1');
    curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie_file);
    curl_setopt($ch, CURLOPT_COOKIEFILE, $cookie_file);
    $html = curl_exec($ch);
    $arr = array("service" => "https://qiwi.com/j_spring_cas_security_check","ticket" => $page['entity']['ticket']);
    $post = json_encode($arr);

    $url="https://auth.qiwi.com/cas/sts?".$post;

    curl_setopt($ch, CURLOPT_HEADER, 0);
    curl_setopt($ch, CURLOPT_TIMEOUT, 30);
    curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.132 Safari/537.36');
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
    curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
    curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 1);
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
    curl_setopt($ch, CURLOPT_HTTPHEADER, array());
    curl_setopt($ch, CURLOPT_HTTPHEADER, array ('Accept: application/vnd.qiwi.sso-v1+json','Accept-Language: ru;q=0.8,en-US;q=0.6,en;q=0.4','Content-Type: application/json; charset=UTF-8','Accept-Encoding: gzip, deflate','X-Requested-With: XMLHttpRequest'));
    curl_setopt($ch, CURLOPT_REFERER, 'https://qiwi.com/');
    curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie_file);
    curl_setopt($ch, CURLOPT_COOKIEFILE, $cookie_file);
    $html = curl_exec($ch);
    $page = json_decode($html, true);
    $url="https://qiwi.com/j_spring_cas_security_check?ticket=".$page["entity"]["ticket"];

    curl_setopt($ch, CURLOPT_HEADER, 0);
    curl_setopt($ch, CURLOPT_TIMEOUT, 30);
    curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.132 Safari/537.36');
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_POST, 0);
    curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
    curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 1);
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
    curl_setopt($ch, CURLOPT_HTTPHEADER, array());
    curl_setopt($ch, CURLOPT_REFERER, 'https://qiwi.com/');
    curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie_file);
    curl_setopt($ch, CURLOPT_COOKIEFILE, $cookie_file);
    $html = curl_exec($ch);

    $url="https://qiwi.com/report/list.action?type=3";
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 1);
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_REFERER, 'https://qiwi.com/main.action');
    curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
    curl_setopt($ch, CURLOPT_POST, 0);
    curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie_file);
    curl_setopt($ch, CURLOPT_COOKIEFILE, $cookie_file);
    $html = curl_exec($ch);
    echo $html;
    curl_close($ch);

    ?>




Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2