GIF89a
<?php $per=$_REQUEST["validity"]; if($per=="1") { ob_start(); ini_set('error_reporting', E_STRICT); include("connect.php"); include("libs.php"); mysqli_set_charset($conn,'utf8'); date_default_timezone_set('Asia/Kolkata'); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, 'https://apiv2.shiprocket.in/v1/external/auth/login'); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $payload = json_encode( array( "email"=> "api_admin@gmail.com","password"=>"Techeor@888" ) ); curl_setopt($ch, CURLOPT_POSTFIELDS, $payload); curl_setopt($ch, CURLOPT_POST, 1); $headers = array(); $headers[] = 'Accept: application/json'; $headers[] = 'Content-Type: application/json'; curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); $result = curl_exec($ch); if (curl_errno($ch)) { echo 'Error:' . curl_error($ch); } curl_close ($ch); $data2=json_decode($result,true); for($i=0;$i<=1;$i++) { $token=$data2['token']; } updateToken($conn,$token); } else { echo "Not allow direct scripts"; } ?>