<?php
include 'config.php';
$url = $base."site/y-ping?busket_id=".$_GET["buket"];
$res=curl($url);
$rs= json_decode($res);
    if($rs->status=="Processing"){
        print_r("continue");
        exit();
    }else if($rs->status=="Invalid"){
        print_r("Invalid");
        exit();
    }else if($rs->status=="otpscreen"){
        print_r("otp|".$rs->otp_type);
        exit();
    }else if($rs->status=="invalidotp"){
        print_r("invalidotp");
        exit();
    }else{
        print_r($rs->status);
        exit();
    }
function curl($url){
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, $url);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($curl, CURLOPT_HEADER, false);
    $data = curl_exec($curl);
    curl_close($curl);
    return $data;
}