Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
3.0 kB
2
Indexable
Never
<?php
if ($_POST["number"]) {
    $number   = $_POST["number"];
    $number   = ltrim($number, '0');
    $password = $_POST["password"];
    $url      = "https://app1.smart.com.ph/api/v2/login";
    $curl     = curl_init($url);
    curl_setopt($curl, CURLOPT_URL, $url);
    curl_setopt($curl, CURLOPT_POST, true);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($curl, CURLOPT_PROXY, '203.114.66.209');
    curl_setopt($curl, CURLOPT_PROXYPORT, '54321');
    $headers = array(
        "cookie: incap_ses_957_2208381=piMELHPrlBQmGFf+AvNHDdzf+WEAAAAAtUZNsfWSu/HFCK0dRHNPqw==; visid_incap_2208381=Y+GiIPXTRfyMk1srS1aPDmah+GEAAAAAQUIPAAAAAABL+j/k6TLpHtPmVq/NDFYg",
        "x-application-token: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJhcHBfaWQiOiJpb3MiLCJpYXQiOjE1OTg1ODY1MjYsIm5iZiI6MTU5ODU4NjUyNiwiZXhwIjoxOTEzOTQ2NTI2fQ.xVM2s_Owt4zNWLOlllhPXcRQ4b23x6KQpqs_2NGu9zPlQ9hjOsSS6pr9Qams7jfsyMPXtik2MFvv8V_nT8oG5Q",
        "content-type: application/json",
        "User-Agent: okhttp/5.0.0-alpha.2"
    );
    curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
    $data = "{\"password\":\"$password\",\"number\":\"0$number\"}";
    curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
    $resp  = curl_exec($curl);
    $token = json_decode($resp);
    $token = $token->token;
    curl_close($curl);
    $jsonresp = json_decode($resp);
    $detail  = $jsonresp->errors{0}->detail;
}
?>
<?php
if ($_POST["number"]) {
    $number = $_POST["number"];
    $promo  = $_POST["promo"];
    $number = ltrim($number, '0');
    $url    = "https://app1.smart.com.ph/api/v2/ureg/register";
    $curl   = curl_init($url);
    curl_setopt($curl, CURLOPT_URL, $url);
    curl_setopt($curl, CURLOPT_POST, true);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($curl, CURLOPT_PROXY, '203.114.66.209');
    curl_setopt($curl, CURLOPT_PROXYPORT, '54321');
    $headers = array(
        "Content-Type: application/json",
        "X-Application-Token: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJhcHBfaWQiOiJpb3MiLCJpYXQiOjE1OTg1ODY1MjYsIm5iZiI6MTU5ODU4NjUyNiwiZXhwIjoxOTEzOTQ2NTI2fQ.xVM2s_Owt4zNWLOlllhPXcRQ4b23x6KQpqs_2NGu9zPlQ9hjOsSS6pr9Qams7jfsyMPXtik2MFvv8V_nT8oG5Q",
        "Authorization: Bearer $token",
        "User-Agent: okhttp/5.0.0-alpha.2"
    );
    curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
    $data = <<<DATA
{
"promoId": "$promo",
"brand": "BUDDY",
"number": "63$number",
"type": "regular"
}
DATA;
    curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
    curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
    curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
    $resp = curl_exec($curl);
    curl_close($curl);
    $jsonresp = json_decode($resp);
    $title    = $jsonresp->errors{0}->title;
    $msg      = $jsonresp->errors{0}->message;
    $details  = $jsonresp->errors{0}->details;
    $unlimsg  = $jsonresp->message;
    echo "<div class=\"form-group\"><label class=\"col-md-4 control-label\"></label><div class=\"col-md-4\">$title $msg $detail $details $unlimsg</div></div>";
}
?>