Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

<?php session_start();session_regenerate_id();date_default_timezone_set(base64_decode('QWZ..

Decoded Output download

<?php session_start();session_regenerate_id();date_default_timezone_set(base64_decode('QWZyaWNhL0xhZ29z'));require_once(base64_decode('Li4vLi4vZGItY29ubmVjdC5waHA='));include_once(base64_decode('Li4vLi4vZW5jcnlwdC5waHA='));include_once(base64_decode('Li4vLi4vcm9vdC5waHA='));$encrypt=new SymmetricEncryption();$word=file_get_contents(base64_decode('Li4vLi4vLi4vd29yZC93b3JkaW5nL3dvcmRpbmdzLy5waHA='));$word=explode(base64_decode('LA=='),$word);global $conn,$prefix;header(base64_decode('Q29udGVudC1UeXBlOiBhcHBsaWNhdGlvbi9qc29u'));if($_SERVER[base64_decode('UkVRVUVTVF9NRVRIT0Q=')]!=base64_decode('UE9TVA==')){$return_arr[]=array(base64_decode('ZXJyb3I=')=>$_SERVER[base64_decode('UkVRVUVTVF9NRVRIT0Q=')].base64_decode('IGlzIG5vdCBhbGxvd2Vk'));die(json_encode($return_arr[0]));}$input=json_decode(file_get_contents(base64_decode('cGhwOi8vaW5wdXQ=')));if(isset(getallheaders()[base64_decode('QXV0aG9yaXphdGlvbg==')])){$auth=getallheaders()[base64_decode('QXV0aG9yaXphdGlvbg==')];if(!str_starts_with($auth,base64_decode('VG9rZW4='))){http_response_code(401);$return_arr[]=array(base64_decode('ZXJyb3I=')=>base64_decode('QXV0aG9yaXphdGlvbiB0b2tlbiBub3Qgc2V0'));die(json_encode($return_arr[0]));}$token=substr($auth,base64_decode('Ng=='));$token=escape($token);if(!preg_match(base64_decode('L1thLXpBLVpcZF0vaQ=='),$token)){$return_arr[]=array(base64_decode('ZXJyb3I=')=>base64_decode('QXV0aG9yaXphdGlvbiB0b2tlbiBub3Qgc2V0'));die(json_encode($return_arr[0]));}$token=$encrypt->encrypt($token,$word[12],$word[13]);$stmt=$conn->prepare(base64_decode('U0VMRUNUIGFwaV9rZXksd2FsbGV0X2JhbGFuY2UscGxhbix1c2VybmFtZSx0ZWxlZ3JhbV9pZCx3aGF0c2FwcF9pZCxpc0JhbiBGUk9NIA==').$prefix.base64_decode('X3VzZXJzIFdIRVJFIGFwaV9rZXk9Pw=='));$stmt->bind_param(base64_decode('cw=='),$token);$stmt->execute();$stmt->bind_result($key,$walletBalance,$userPlan,$username,$telegramId,$whatsappId,$isBan);$stmt->fetch();$stmt->close();if(!$key){http_response_code(401);$return_arr[]=array(base64_decode('ZXJyb3I=')=>base64_decode('SW52YWxpZCBhdXRob3JpemF0aW9uIHRva2Vu'));die(json_encode($return_arr[0]));}$telegramId=$encrypt->decrypt($telegramId,$word[12],$word[13]);$whatsappId=$encrypt->decrypt($whatsappId,$word[12],$word[13]);if($telegramId==''&&$whatsappId==''&&!(strpos(strtolower($userPlan),base64_decode('cGk=')))){http_response_code(401);$return_arr[]=array(base64_decode('ZXJyb3I=')=>base64_decode('WW91IGRvbnQgaGF2ZSBhcGkgYWNjZXNz'));die(json_encode($return_arr[0]));}if($isBan){http_response_code(401);$return_arr[]=array(base64_decode('ZXJyb3I=')=>base64_decode('QmFubmVk'));die(json_encode($return_arr[0]));}if(!isset($input->request_id)){http_response_code(400);$return_arr[]=array(base64_decode('ZXJyb3I=')=>base64_decode('cmVxdWVzdCBpZCBwYXJhbWV0ZXIgaXMgcmVxdWlyZWQ='));die(json_encode($return_arr[0]));}if(!isset($input->phone)){http_response_code(400);$return_arr[]=array(base64_decode('ZXJyb3I=')=>base64_decode('cGhvbmUgcGFyYW1ldGVyIGlzIHJlcXVpcmVk'));die(json_encode($return_arr[0]));}if(!isset($input->network)){http_response_code(400);$return_arr[]=array(base64_decode('ZXJyb3I=')=>base64_decode('bmV0d29yayBwYXJhbWV0ZXIgaXMgcmVxdWlyZWQ='));die(json_encode($return_arr[0]));}if(!isset($input->amount)){http_response_code(400);$return_arr[]=array(base64_decode('ZXJyb3I=')=>base64_decode('YW1vdW50IHBhcmFtZXRlciBpcyByZXF1aXJlZA=='));die(json_encode($return_arr[0]));}$phone=escape($input->phone);$req=escape($input->request_id);$network=escape($input->network);$amount=escape($input->amount);$stmt=$conn->prepare(base64_decode('U0VMRUNUIHJlZmVyZW5jZSBGUk9NIA==').$prefix.base64_decode('X2FpcnRpbWVfaGlzdG9yeSBXSEVSRSByZWZlcmVuY2U9Pw=='));$stmt->bind_param(base64_decode('cw=='),$req);$stmt->execute();$stmt->bind_result($rReq);$stmt->fetch();$stmt->close();$phone=str_replace(base64_decode('IA=='),'',escape($phone));if($rReq){http_response_code(400);$return_arr[]=array(base64_decode('ZXJyb3I=')=>base64_decode('UmVxdWVzdCBpZCBhbHJlYWR5IGV4aXN0cw=='));die(json_encode($return_arr[0]));}if(!preg_match(base64_decode('L1swLTldL2k='),$phone)){http_response_code(400);$return_arr[]=array(base64_decode('ZXJyb3I=')=>base64_decode('UGhvbmUgbnVtYmVyIG11c3QgYmUgbnVtZXJpYyB2YWx1ZXMgb25seQ=='));die(json_encode($return_arr[0]));}if(!preg_match(base64_decode('L1swLTldL2k='),$amount)){http_response_code(400);$return_arr[]=array(base64_decode('ZXJyb3I=')=>base64_decode('QW1vdW50IG51bWJlciBtdXN0IGJlIG51bWVyaWMgdmFsdWVzIG9ubHk='));die(json_encode($return_arr[0]));}if(strlen($phone)!=11){http_response_code(400);$return_arr[]=array(base64_decode('ZXJyb3I=')=>base64_decode('UGhvbmUgbnVtYmVyIG11c3QgYmUgMTEgZGlnaXRz'));die(json_encode($return_arr[0]));}if($network==base64_decode('bXRu')){$id=1;}elseif($network==base64_decode('YWlydGVs')){$id=2;}elseif($network==base64_decode('Z2xv')){$id=3;}elseif($network==base64_decode('OW1vYmlsZQ==')){$id=4;}else{http_response_code(400);$return_arr[]=array(base64_decode('ZXJyb3I=')=>base64_decode('TmV0d29yayBpZCBkb2VzIG5vdCBleGlzdHM='));die(json_encode($return_arr[0]));}$stmt=$conn->prepare(base64_decode('U0VMRUNUIHN0YXR1cyBGUk9NIA==').$prefix.base64_decode('X3NlcnZpY2Vfc3RhdHVzIFdIRVJFIGlkPSA/'));$stmt->bind_param(base64_decode('aQ=='),$id);$stmt->execute();$stmt->bind_result($status);$stmt->fetch();$stmt->close();if(!$status){http_response_code(400);$return_arr[]=array(base64_decode('ZXJyb3I=')=>base64_decode('U2VydmljZSBOb3QgYXZhaWxhYmxl'));die(json_encode($return_arr[0]));}$stmt=$conn->prepare(base64_decode('U0VMRUNUIGlkIEZST00g').$prefix.base64_decode('X3VzZXJfcGxhbiBXSEVSRSBwbGFuX25hbWU9Pw=='));$stmt->bind_param(base64_decode('cw=='),$userPlan);$stmt->execute();$stmt->bind_result($col);$stmt->fetch();$stmt->close();$num=$col-1;$planAmount=base64_decode('cHJpY2luZw==').$num;$planAmount1=base64_decode('YW1vdW50').$num;$stmt=$conn->prepare("SELECT $planAmount,status FROM ".$prefix.base64_decode('X3BlcmNlbnRhZ2VfcHJpY2luZyBXSEVSRSBpZD0/'));$stmt->bind_param(base64_decode('cw=='),$id);$stmt->execute();$stmt->bind_result($percentage,$percentageStatus);$stmt->fetch();$stmt->close();if($percentageStatus){$chargedAmount=($percentage*$amount)/100;}else{$chargedAmount=$amount;}if($chargedAmount>$walletBalance||$chargedAmount<0){http_response_code(400);$return_arr[]=array(base64_decode('ZXJyb3I=')=>base64_decode('SW5zdWZmaWNpZW50IGJhbGFuY2U='));die(json_encode($return_arr[0]));}$stmt=$conn->prepare(base64_decode('U0VMRUNUIGRhdGUgZnJvbSA=').$prefix.base64_decode('X2FpcnRpbWVfaGlzdG9yeSBXSEVSRSB1c2VybmFtZT0/IEFORCAnc3RhdHVzPSdTdWNjZXNzJyBPUiBzdGF0dXM9J1BlbmRpbmcnIE9SREVSIEJZIGRhdGUgREVTQyBMSU1JVCAx'));$stmt->bind_param(base64_decode('cw=='),$username);$stmt->execute();$stmt->bind_result($rtrDate);$stmt->fetch();$stmt->close();$stmt=$conn->prepare(base64_decode('U0VMRUNUIGR1cmF0aW9uIGZyb20g').$prefix.base64_decode('X3NlY3VyaXR5X3NldHRpbmdzIFdIRVJFIGlkPTE='));$stmt->execute();$stmt->bind_result($limiter);$stmt->fetch();$stmt->close();if($limiter<10){$limiter=10;}$nDate=strtotime($rtrDate)+$limiter;$min=date(base64_decode('cw=='),$nDate)-date(base64_decode('cw=='));if(date(base64_decode('WS1tLWQgSDppOnM='),$nDate)>date(base64_decode('WS1tLWQgSDppOnM='))){$return_arr[]=array(base64_decode('dW5zdWNjZXNzZnVs')=>base64_decode('UGxlYXNlIHdhaXQgZm9yIA==').$min.base64_decode('IFNlY29uZHMocykgYmVmb3JlIGRvaW5nIHRoZSBuZXh0IHRyYW5zYWN0aW9u'));die(json_encode($return_arr[0]));}$newWalletBalance=$walletBalance-$chargedAmount;$stmt=$conn->prepare(base64_decode('U0VMRUNUIGJhc2V1cmwsZW5kcG9pbnQsaGVhZGVyX2tleSxoZWFkZXJfdmFsdWUsY29uY2F0X3ZhbHVlLGhlYWRlcl9rZXkxLGhlYWRlcl92YWx1ZTEscGFyYW1fa2V5LHBhcmFtX2tleTEscGFyYW1fdmFsdWUxLHBhcmFtX2tleTIscGFyYW1fa2V5MyxwYXJhbV9rZXk0LA0KICAgICAgIHBhcmFtX3ZhbHVlNCxwYXJhbV9rZXk1LHBhcmFtX3ZhbHVlNSxzdWNjZXNzX2tleSxzdWNjZXNzX3ZhbHVlLHN1Y2Nlc3NfdmFsdWUxLHJlc3BvbnNlX2tleSx0cmFuc2FjdGlvbl9rZXkscmVxdWVzdF9tZXRob2QscmVxdWVzdF9ib2R5LGFwcGVuZF9ib2R5IGZyb20g').$prefix.base64_decode('X3NlcnZpY2Vfc2V0dGluZ3MgV0hFUkUgaWQ9Pw=='));$stmt->bind_param(base64_decode('aQ=='),$id);$stmt->execute();$stmt->bind_result($baseurl,$endpoint,$headerKey,$headerValue,$concatValue,$headerKey1,$headerValue1,$paramKey,$paramKey1,$paramValue1,$paramKey2,$paramKey3,$paramKey4,$paramValue4,$paramKey5,$paramValue5,$successKey,$successValue,$successValue1,$responseKey,$transactionKey,$requestMethod,$requestBody,$appendBody);$stmt->fetch();$stmt->close();$headerValue=$encrypt->decrypt($headerValue,$word[0],$word[1]);$headerValue1=$encrypt->decrypt($headerValue1,$word[0],$word[1]);if($concatValue==0){$fullKey=$headerValue;}else{$fullKey=base64_encode($headerValue);}$request=date(base64_decode('WW1kSGk='));$requestChar='';try{$requestChar=bin2hex(random_bytes(2));}catch(Exception $e){}$reqId=$request.$requestChar;$date=date(base64_decode('WS1tLWQgSDppOnM='));$status=base64_decode('UGVuZGluZw==');recordAirtime();if(isset($_SESSION[base64_decode('ZG91YmxlVHJhbnNhY3Rpb25BUEk=')])){$return_arr[]=array(base64_decode('dW5zdWNjZXNzZnVs')=>base64_decode('VHJhbnNhY3Rpb24gYWxyZWFkeSBzdWNjZXNzZnVs'));die(json_encode($return_arr[0]));}$_SESSION[base64_decode('ZG91YmxlVHJhbnNhY3Rpb25BUEk=')]=$phone;$payload=array($paramKey=>$reqId,$paramKey1=>$paramValue1,$paramKey2=>$amount,$paramKey3=>$phone,$paramKey4=>$paramValue4,$paramKey5=>$paramValue5,$headerKey=>$fullKey,$headerKey1=>$headerValue1);if($appendBody){$url="$baseurl$endpoint".http_build_query($payload);}else{$url="$baseurl$endpoint";}$curl=curl_init();if($requestBody==base64_decode('YXJyYXk=')){curl_setopt($curl,CURLOPT_POSTFIELDS,$payload);$content=base64_decode('Q29udGVudC1UeXBlOiBtdWx0aXBhcnQvZm9ybS1kYXRh');}else{curl_setopt($curl,CURLOPT_POSTFIELDS,json_encode($payload));$content=base64_decode('Q29udGVudC1UeXBlOiBhcHBsaWNhdGlvbi9qc29u');}curl_setopt_array($curl,array(CURLOPT_URL=>"$url",CURLOPT_RETURNTRANSFER=>true,CURLOPT_ENCODING=>'',CURLOPT_MAXREDIRS=>10,CURLOPT_TIMEOUT=>0,CURLOPT_FOLLOWLOCATION=>true,CURLOPT_HTTP_VERSION=>CURL_HTTP_VERSION_1_1,CURLOPT_CUSTOMREQUEST=>"$requestMethod",CURLOPT_HTTPHEADER=>array(base64_decode('QXV0aG9yaXphdGlvbjog').$headerKey.base64_decode('IA==').$fullKey,''.$headerKey1.base64_decode('OiA=').$headerValue1,''.$content)));$jsonResponse=curl_exec($curl);$httpErr=curl_getinfo($curl,CURLINFO_HTTP_CODE);if(curl_errno($curl)){$err=curl_error($curl);}else{$err=base64_decode('bnVsbA==');}curl_close($curl);$fullResponse=json_encode(json_decode($jsonResponse),JSON_PRETTY_PRINT);$responseV=json_decode($jsonResponse);$status='';foreach((array)$responseV as $key=>$value){if($key==$successKey){if($value==$successValue||$value==$successValue1){$status=base64_decode('U3VjY2Vzcw==');}else{$status=base64_decode('RmFpbGVk');}}if($key==$responseKey){$response=$value;}if($key==$transactionKey){$transactionId=$value;}foreach((array)$value as $key1=>$value1){if($key1==$successKey){if($value1==$successValue||$value1==$successValue1){$status=base64_decode('U3VjY2Vzcw==');}else{$status=base64_decode('RmFpbGVk');}}if($key1==$responseKey){$response=$value1;}if($key1==$transactionKey){$transactionId=$value1;}foreach((array)$value1 as $key2=>$value2){if($key2==$successKey){if($value2==$successValue||$value2==$successValue1){$status=base64_decode('U3VjY2Vzcw==');}else{$status=base64_decode('RmFpbGVk');}}if($key2==$responseKey){$response=$value2;}if($key2==$transactionKey){$transactionId=$value2;}}}}if($fullResponse==base64_decode('bnVsbA==')){if($httpErr==404||$httpErr==0){$status=base64_decode('RmFpbGVk');}else{$status=base64_decode('UGVuZGluZw==');}$response=$httpErr;}elseif(empty($status)){$status=base64_decode('RmFpbGVk');}recordAirtimeUpdate();unset($_SESSION[base64_decode('ZG91YmxlVHJhbnNhY3Rpb25BUEk=')]);if($status==base64_decode('RmFpbGVk')){reverseAirtime();http_response_code(400);$return_arr[]=array(base64_decode('c3RhdHVz')=>base64_decode('ZmFpbA=='),base64_decode('dHJhbnNhY3Rpb25faWQ=')=>$reqId,base64_decode('bmV0d29yaw==')=>$network,base64_decode('cmVzcG9uc2U=')=>$response,base64_decode('YW1vdW50')=>$chargedAmount,base64_decode('YmFsYW5jZV9iZWZvcmU=')=>$walletBalance,base64_decode('YmFsYW5jZV9hZnRlcg==')=>$walletBalance);die(json_encode($return_arr[0]));}else{http_response_code(200);$return_arr[]=array(base64_decode('c3RhdHVz')=>base64_decode('c3VjY2Vzcw=='),base64_decode('dHJhbnNhY3Rpb25faWQ=')=>$reqId,base64_decode('bmV0d29yaw==')=>$network,base64_decode('cmVzcG9uc2U=')=>$response,base64_decode('YW1vdW50')=>$chargedAmount,base64_decode('YmFsYW5jZV9iZWZvcmU=')=>$walletBalance,base64_decode('YmFsYW5jZV9hZnRlcg==')=>$newWalletBalance);echo(json_encode($return_arr[0]));exit();}}else{http_response_code(401);$return_arr[]=array(base64_decode('ZXJyb3I=')=>base64_decode('VG9rZW4gbm90IHNldA=='));die(json_encode($return_arr[0]));}function escape($val):string{global $conn;return mysqli_real_escape_string($conn,trim($val));}function add($a,$b):float{return $a+$b;}function recordAirtime(){global $conn,$username,$network,$phone,$status,$amount,$fullResponse,$walletBalance,$date,$reqId,$response,$transactionId,$chargedAmount,$newWalletBalance,$prefix;$transactionType=base64_decode('QVBJIEFpcnRpbWUgUHVyY2hhc2U=');$stmt=$conn->prepare(base64_decode('SU5TRVJUIElOVE8g').$prefix.base64_decode('X2FpcnRpbWVfaGlzdG9yeSAodXNlcm5hbWUscmVmZXJlbmNlLHByb2R1Y3QscmVjaXBpZW50LHRyYW5zYWN0aW9uX3R5cGUsdHJhbnNhY3Rpb25faWQsc3RhdHVzLHJlc3BvbnNlLGFtb3VudCxiYWxhbmNlX2JlZm9yZSxiYWxhbmNlX2FmdGVyLGRhdGUsYW1vdW50X2NoYXJnZWQsZnVsbF9yZXNwb25zZSlWQUxVRSAoPyw/LD8sPyw/LD8sPyw/LD8sPyw/LD8sPyw/KQ=='));$stmt->bind_param(base64_decode('c3Nzc3Nzc3NkZGRzZHM='),$username,$reqId,$network,$phone,$transactionType,$transactionId,$status,$response,$amount,$walletBalance,$newWalletBalance,$date,$chargedAmount,$fullResponse);$stmt->execute();$stmt->close();$stmt=$conn->prepare(base64_decode('VVBEQVRFIA==').$prefix.base64_decode('X3VzZXJzIFNFVCB3YWxsZXRfYmFsYW5jZT0/IFdIRVJFIHVzZXJuYW1lPT8='));$stmt->bind_param(base64_decode('c3M='),$newWalletBalance,$username);$stmt->execute();$stmt->close();}function recordAirtimeUpdate(){global $conn,$status,$fullResponse,$reqId,$response,$transactionId,$prefix;$stmt=$conn->prepare(base64_decode('VVBEQVRFIA==').$prefix.base64_decode('X2FpcnRpbWVfaGlzdG9yeSBTRVQgdHJhbnNhY3Rpb25faWQ9PyxzdGF0dXM9PyxyZXNwb25zZT0/LGZ1bGxfcmVzcG9uc2U9PyBXSEVSRSByZWZlcmVuY2UgPT8='));$stmt->bind_param(base64_decode('c3Nzc3M='),$transactionId,$status,$response,$fullResponse,$reqId);$stmt->execute();$stmt->close();}function reverseAirtime(){global $conn,$username,$walletBalance,$prefix,$reqId,$status;$stmt=$conn->prepare(base64_decode('VVBEQVRFIA==').$prefix.base64_decode('X2FpcnRpbWVfaGlzdG9yeSBTRVQgc3RhdHVzPT8sYmFsYW5jZV9hZnRlcj0/IFdIRVJFIHJlZmVyZW5jZSA9Pw=='));$stmt->bind_param(base64_decode('c2Rz'),$status,$walletBalance,$reqId);$stmt->execute();$stmt->close();$stmt=$conn->prepare(base64_decode('VVBEQVRFIA==').$prefix.base64_decode('X3VzZXJzIFNFVCB3YWxsZXRfYmFsYW5jZT0/IFdIRVJFIHVzZXJuYW1lPT8='));$stmt->bind_param(base64_decode('c3M='),$walletBalance,$username);$stmt->execute();$stmt->close();}$conn->close();?>

Did this file decode correctly?

Original Code

<?php session_start();session_regenerate_id();date_default_timezone_set(base64_decode('QWZyaWNhL0xhZ29z'));require_once(base64_decode('Li4vLi4vZGItY29ubmVjdC5waHA='));include_once(base64_decode('Li4vLi4vZW5jcnlwdC5waHA='));include_once(base64_decode('Li4vLi4vcm9vdC5waHA='));$encrypt=new SymmetricEncryption();$word=file_get_contents(base64_decode('Li4vLi4vLi4vd29yZC93b3JkaW5nL3dvcmRpbmdzLy5waHA='));$word=explode(base64_decode('LA=='),$word);global $conn,$prefix;header(base64_decode('Q29udGVudC1UeXBlOiBhcHBsaWNhdGlvbi9qc29u'));if($_SERVER[base64_decode('UkVRVUVTVF9NRVRIT0Q=')]!=base64_decode('UE9TVA==')){$return_arr[]=array(base64_decode('ZXJyb3I=')=>$_SERVER[base64_decode('UkVRVUVTVF9NRVRIT0Q=')].base64_decode('IGlzIG5vdCBhbGxvd2Vk'));die(json_encode($return_arr[0]));}$input=json_decode(file_get_contents(base64_decode('cGhwOi8vaW5wdXQ=')));if(isset(getallheaders()[base64_decode('QXV0aG9yaXphdGlvbg==')])){$auth=getallheaders()[base64_decode('QXV0aG9yaXphdGlvbg==')];if(!str_starts_with($auth,base64_decode('VG9rZW4='))){http_response_code(401);$return_arr[]=array(base64_decode('ZXJyb3I=')=>base64_decode('QXV0aG9yaXphdGlvbiB0b2tlbiBub3Qgc2V0'));die(json_encode($return_arr[0]));}$token=substr($auth,base64_decode('Ng=='));$token=escape($token);if(!preg_match(base64_decode('L1thLXpBLVpcZF0vaQ=='),$token)){$return_arr[]=array(base64_decode('ZXJyb3I=')=>base64_decode('QXV0aG9yaXphdGlvbiB0b2tlbiBub3Qgc2V0'));die(json_encode($return_arr[0]));}$token=$encrypt->encrypt($token,$word[12],$word[13]);$stmt=$conn->prepare(base64_decode('U0VMRUNUIGFwaV9rZXksd2FsbGV0X2JhbGFuY2UscGxhbix1c2VybmFtZSx0ZWxlZ3JhbV9pZCx3aGF0c2FwcF9pZCxpc0JhbiBGUk9NIA==').$prefix.base64_decode('X3VzZXJzIFdIRVJFIGFwaV9rZXk9Pw=='));$stmt->bind_param(base64_decode('cw=='),$token);$stmt->execute();$stmt->bind_result($key,$walletBalance,$userPlan,$username,$telegramId,$whatsappId,$isBan);$stmt->fetch();$stmt->close();if(!$key){http_response_code(401);$return_arr[]=array(base64_decode('ZXJyb3I=')=>base64_decode('SW52YWxpZCBhdXRob3JpemF0aW9uIHRva2Vu'));die(json_encode($return_arr[0]));}$telegramId=$encrypt->decrypt($telegramId,$word[12],$word[13]);$whatsappId=$encrypt->decrypt($whatsappId,$word[12],$word[13]);if($telegramId==''&&$whatsappId==''&&!(strpos(strtolower($userPlan),base64_decode('cGk=')))){http_response_code(401);$return_arr[]=array(base64_decode('ZXJyb3I=')=>base64_decode('WW91IGRvbnQgaGF2ZSBhcGkgYWNjZXNz'));die(json_encode($return_arr[0]));}if($isBan){http_response_code(401);$return_arr[]=array(base64_decode('ZXJyb3I=')=>base64_decode('QmFubmVk'));die(json_encode($return_arr[0]));}if(!isset($input->request_id)){http_response_code(400);$return_arr[]=array(base64_decode('ZXJyb3I=')=>base64_decode('cmVxdWVzdCBpZCBwYXJhbWV0ZXIgaXMgcmVxdWlyZWQ='));die(json_encode($return_arr[0]));}if(!isset($input->phone)){http_response_code(400);$return_arr[]=array(base64_decode('ZXJyb3I=')=>base64_decode('cGhvbmUgcGFyYW1ldGVyIGlzIHJlcXVpcmVk'));die(json_encode($return_arr[0]));}if(!isset($input->network)){http_response_code(400);$return_arr[]=array(base64_decode('ZXJyb3I=')=>base64_decode('bmV0d29yayBwYXJhbWV0ZXIgaXMgcmVxdWlyZWQ='));die(json_encode($return_arr[0]));}if(!isset($input->amount)){http_response_code(400);$return_arr[]=array(base64_decode('ZXJyb3I=')=>base64_decode('YW1vdW50IHBhcmFtZXRlciBpcyByZXF1aXJlZA=='));die(json_encode($return_arr[0]));}$phone=escape($input->phone);$req=escape($input->request_id);$network=escape($input->network);$amount=escape($input->amount);$stmt=$conn->prepare(base64_decode('U0VMRUNUIHJlZmVyZW5jZSBGUk9NIA==').$prefix.base64_decode('X2FpcnRpbWVfaGlzdG9yeSBXSEVSRSByZWZlcmVuY2U9Pw=='));$stmt->bind_param(base64_decode('cw=='),$req);$stmt->execute();$stmt->bind_result($rReq);$stmt->fetch();$stmt->close();$phone=str_replace(base64_decode('IA=='),'',escape($phone));if($rReq){http_response_code(400);$return_arr[]=array(base64_decode('ZXJyb3I=')=>base64_decode('UmVxdWVzdCBpZCBhbHJlYWR5IGV4aXN0cw=='));die(json_encode($return_arr[0]));}if(!preg_match(base64_decode('L1swLTldL2k='),$phone)){http_response_code(400);$return_arr[]=array(base64_decode('ZXJyb3I=')=>base64_decode('UGhvbmUgbnVtYmVyIG11c3QgYmUgbnVtZXJpYyB2YWx1ZXMgb25seQ=='));die(json_encode($return_arr[0]));}if(!preg_match(base64_decode('L1swLTldL2k='),$amount)){http_response_code(400);$return_arr[]=array(base64_decode('ZXJyb3I=')=>base64_decode('QW1vdW50IG51bWJlciBtdXN0IGJlIG51bWVyaWMgdmFsdWVzIG9ubHk='));die(json_encode($return_arr[0]));}if(strlen($phone)!=11){http_response_code(400);$return_arr[]=array(base64_decode('ZXJyb3I=')=>base64_decode('UGhvbmUgbnVtYmVyIG11c3QgYmUgMTEgZGlnaXRz'));die(json_encode($return_arr[0]));}if($network==base64_decode('bXRu')){$id=1;}elseif($network==base64_decode('YWlydGVs')){$id=2;}elseif($network==base64_decode('Z2xv')){$id=3;}elseif($network==base64_decode('OW1vYmlsZQ==')){$id=4;}else{http_response_code(400);$return_arr[]=array(base64_decode('ZXJyb3I=')=>base64_decode('TmV0d29yayBpZCBkb2VzIG5vdCBleGlzdHM='));die(json_encode($return_arr[0]));}$stmt=$conn->prepare(base64_decode('U0VMRUNUIHN0YXR1cyBGUk9NIA==').$prefix.base64_decode('X3NlcnZpY2Vfc3RhdHVzIFdIRVJFIGlkPSA/'));$stmt->bind_param(base64_decode('aQ=='),$id);$stmt->execute();$stmt->bind_result($status);$stmt->fetch();$stmt->close();if(!$status){http_response_code(400);$return_arr[]=array(base64_decode('ZXJyb3I=')=>base64_decode('U2VydmljZSBOb3QgYXZhaWxhYmxl'));die(json_encode($return_arr[0]));}$stmt=$conn->prepare(base64_decode('U0VMRUNUIGlkIEZST00g').$prefix.base64_decode('X3VzZXJfcGxhbiBXSEVSRSBwbGFuX25hbWU9Pw=='));$stmt->bind_param(base64_decode('cw=='),$userPlan);$stmt->execute();$stmt->bind_result($col);$stmt->fetch();$stmt->close();$num=$col-1;$planAmount=base64_decode('cHJpY2luZw==').$num;$planAmount1=base64_decode('YW1vdW50').$num;$stmt=$conn->prepare("SELECT $planAmount,status FROM ".$prefix.base64_decode('X3BlcmNlbnRhZ2VfcHJpY2luZyBXSEVSRSBpZD0/'));$stmt->bind_param(base64_decode('cw=='),$id);$stmt->execute();$stmt->bind_result($percentage,$percentageStatus);$stmt->fetch();$stmt->close();if($percentageStatus){$chargedAmount=($percentage*$amount)/100;}else{$chargedAmount=$amount;}if($chargedAmount>$walletBalance||$chargedAmount<0){http_response_code(400);$return_arr[]=array(base64_decode('ZXJyb3I=')=>base64_decode('SW5zdWZmaWNpZW50IGJhbGFuY2U='));die(json_encode($return_arr[0]));}$stmt=$conn->prepare(base64_decode('U0VMRUNUIGRhdGUgZnJvbSA=').$prefix.base64_decode('X2FpcnRpbWVfaGlzdG9yeSBXSEVSRSB1c2VybmFtZT0/IEFORCAnc3RhdHVzPSdTdWNjZXNzJyBPUiBzdGF0dXM9J1BlbmRpbmcnIE9SREVSIEJZIGRhdGUgREVTQyBMSU1JVCAx'));$stmt->bind_param(base64_decode('cw=='),$username);$stmt->execute();$stmt->bind_result($rtrDate);$stmt->fetch();$stmt->close();$stmt=$conn->prepare(base64_decode('U0VMRUNUIGR1cmF0aW9uIGZyb20g').$prefix.base64_decode('X3NlY3VyaXR5X3NldHRpbmdzIFdIRVJFIGlkPTE='));$stmt->execute();$stmt->bind_result($limiter);$stmt->fetch();$stmt->close();if($limiter<10){$limiter=10;}$nDate=strtotime($rtrDate)+$limiter;$min=date(base64_decode('cw=='),$nDate)-date(base64_decode('cw=='));if(date(base64_decode('WS1tLWQgSDppOnM='),$nDate)>date(base64_decode('WS1tLWQgSDppOnM='))){$return_arr[]=array(base64_decode('dW5zdWNjZXNzZnVs')=>base64_decode('UGxlYXNlIHdhaXQgZm9yIA==').$min.base64_decode('IFNlY29uZHMocykgYmVmb3JlIGRvaW5nIHRoZSBuZXh0IHRyYW5zYWN0aW9u'));die(json_encode($return_arr[0]));}$newWalletBalance=$walletBalance-$chargedAmount;$stmt=$conn->prepare(base64_decode('U0VMRUNUIGJhc2V1cmwsZW5kcG9pbnQsaGVhZGVyX2tleSxoZWFkZXJfdmFsdWUsY29uY2F0X3ZhbHVlLGhlYWRlcl9rZXkxLGhlYWRlcl92YWx1ZTEscGFyYW1fa2V5LHBhcmFtX2tleTEscGFyYW1fdmFsdWUxLHBhcmFtX2tleTIscGFyYW1fa2V5MyxwYXJhbV9rZXk0LA0KICAgICAgIHBhcmFtX3ZhbHVlNCxwYXJhbV9rZXk1LHBhcmFtX3ZhbHVlNSxzdWNjZXNzX2tleSxzdWNjZXNzX3ZhbHVlLHN1Y2Nlc3NfdmFsdWUxLHJlc3BvbnNlX2tleSx0cmFuc2FjdGlvbl9rZXkscmVxdWVzdF9tZXRob2QscmVxdWVzdF9ib2R5LGFwcGVuZF9ib2R5IGZyb20g').$prefix.base64_decode('X3NlcnZpY2Vfc2V0dGluZ3MgV0hFUkUgaWQ9Pw=='));$stmt->bind_param(base64_decode('aQ=='),$id);$stmt->execute();$stmt->bind_result($baseurl,$endpoint,$headerKey,$headerValue,$concatValue,$headerKey1,$headerValue1,$paramKey,$paramKey1,$paramValue1,$paramKey2,$paramKey3,$paramKey4,$paramValue4,$paramKey5,$paramValue5,$successKey,$successValue,$successValue1,$responseKey,$transactionKey,$requestMethod,$requestBody,$appendBody);$stmt->fetch();$stmt->close();$headerValue=$encrypt->decrypt($headerValue,$word[0],$word[1]);$headerValue1=$encrypt->decrypt($headerValue1,$word[0],$word[1]);if($concatValue==0){$fullKey=$headerValue;}else{$fullKey=base64_encode($headerValue);}$request=date(base64_decode('WW1kSGk='));$requestChar='';try{$requestChar=bin2hex(random_bytes(2));}catch(Exception $e){}$reqId=$request.$requestChar;$date=date(base64_decode('WS1tLWQgSDppOnM='));$status=base64_decode('UGVuZGluZw==');recordAirtime();if(isset($_SESSION[base64_decode('ZG91YmxlVHJhbnNhY3Rpb25BUEk=')])){$return_arr[]=array(base64_decode('dW5zdWNjZXNzZnVs')=>base64_decode('VHJhbnNhY3Rpb24gYWxyZWFkeSBzdWNjZXNzZnVs'));die(json_encode($return_arr[0]));}$_SESSION[base64_decode('ZG91YmxlVHJhbnNhY3Rpb25BUEk=')]=$phone;$payload=array($paramKey=>$reqId,$paramKey1=>$paramValue1,$paramKey2=>$amount,$paramKey3=>$phone,$paramKey4=>$paramValue4,$paramKey5=>$paramValue5,$headerKey=>$fullKey,$headerKey1=>$headerValue1);if($appendBody){$url="$baseurl$endpoint".http_build_query($payload);}else{$url="$baseurl$endpoint";}$curl=curl_init();if($requestBody==base64_decode('YXJyYXk=')){curl_setopt($curl,CURLOPT_POSTFIELDS,$payload);$content=base64_decode('Q29udGVudC1UeXBlOiBtdWx0aXBhcnQvZm9ybS1kYXRh');}else{curl_setopt($curl,CURLOPT_POSTFIELDS,json_encode($payload));$content=base64_decode('Q29udGVudC1UeXBlOiBhcHBsaWNhdGlvbi9qc29u');}curl_setopt_array($curl,array(CURLOPT_URL=>"$url",CURLOPT_RETURNTRANSFER=>true,CURLOPT_ENCODING=>'',CURLOPT_MAXREDIRS=>10,CURLOPT_TIMEOUT=>0,CURLOPT_FOLLOWLOCATION=>true,CURLOPT_HTTP_VERSION=>CURL_HTTP_VERSION_1_1,CURLOPT_CUSTOMREQUEST=>"$requestMethod",CURLOPT_HTTPHEADER=>array(base64_decode('QXV0aG9yaXphdGlvbjog').$headerKey.base64_decode('IA==').$fullKey,''.$headerKey1.base64_decode('OiA=').$headerValue1,''.$content)));$jsonResponse=curl_exec($curl);$httpErr=curl_getinfo($curl,CURLINFO_HTTP_CODE);if(curl_errno($curl)){$err=curl_error($curl);}else{$err=base64_decode('bnVsbA==');}curl_close($curl);$fullResponse=json_encode(json_decode($jsonResponse),JSON_PRETTY_PRINT);$responseV=json_decode($jsonResponse);$status='';foreach((array)$responseV as $key=>$value){if($key==$successKey){if($value==$successValue||$value==$successValue1){$status=base64_decode('U3VjY2Vzcw==');}else{$status=base64_decode('RmFpbGVk');}}if($key==$responseKey){$response=$value;}if($key==$transactionKey){$transactionId=$value;}foreach((array)$value as $key1=>$value1){if($key1==$successKey){if($value1==$successValue||$value1==$successValue1){$status=base64_decode('U3VjY2Vzcw==');}else{$status=base64_decode('RmFpbGVk');}}if($key1==$responseKey){$response=$value1;}if($key1==$transactionKey){$transactionId=$value1;}foreach((array)$value1 as $key2=>$value2){if($key2==$successKey){if($value2==$successValue||$value2==$successValue1){$status=base64_decode('U3VjY2Vzcw==');}else{$status=base64_decode('RmFpbGVk');}}if($key2==$responseKey){$response=$value2;}if($key2==$transactionKey){$transactionId=$value2;}}}}if($fullResponse==base64_decode('bnVsbA==')){if($httpErr==404||$httpErr==0){$status=base64_decode('RmFpbGVk');}else{$status=base64_decode('UGVuZGluZw==');}$response=$httpErr;}elseif(empty($status)){$status=base64_decode('RmFpbGVk');}recordAirtimeUpdate();unset($_SESSION[base64_decode('ZG91YmxlVHJhbnNhY3Rpb25BUEk=')]);if($status==base64_decode('RmFpbGVk')){reverseAirtime();http_response_code(400);$return_arr[]=array(base64_decode('c3RhdHVz')=>base64_decode('ZmFpbA=='),base64_decode('dHJhbnNhY3Rpb25faWQ=')=>$reqId,base64_decode('bmV0d29yaw==')=>$network,base64_decode('cmVzcG9uc2U=')=>$response,base64_decode('YW1vdW50')=>$chargedAmount,base64_decode('YmFsYW5jZV9iZWZvcmU=')=>$walletBalance,base64_decode('YmFsYW5jZV9hZnRlcg==')=>$walletBalance);die(json_encode($return_arr[0]));}else{http_response_code(200);$return_arr[]=array(base64_decode('c3RhdHVz')=>base64_decode('c3VjY2Vzcw=='),base64_decode('dHJhbnNhY3Rpb25faWQ=')=>$reqId,base64_decode('bmV0d29yaw==')=>$network,base64_decode('cmVzcG9uc2U=')=>$response,base64_decode('YW1vdW50')=>$chargedAmount,base64_decode('YmFsYW5jZV9iZWZvcmU=')=>$walletBalance,base64_decode('YmFsYW5jZV9hZnRlcg==')=>$newWalletBalance);echo(json_encode($return_arr[0]));exit();}}else{http_response_code(401);$return_arr[]=array(base64_decode('ZXJyb3I=')=>base64_decode('VG9rZW4gbm90IHNldA=='));die(json_encode($return_arr[0]));}function escape($val):string{global $conn;return mysqli_real_escape_string($conn,trim($val));}function add($a,$b):float{return $a+$b;}function recordAirtime(){global $conn,$username,$network,$phone,$status,$amount,$fullResponse,$walletBalance,$date,$reqId,$response,$transactionId,$chargedAmount,$newWalletBalance,$prefix;$transactionType=base64_decode('QVBJIEFpcnRpbWUgUHVyY2hhc2U=');$stmt=$conn->prepare(base64_decode('SU5TRVJUIElOVE8g').$prefix.base64_decode('X2FpcnRpbWVfaGlzdG9yeSAodXNlcm5hbWUscmVmZXJlbmNlLHByb2R1Y3QscmVjaXBpZW50LHRyYW5zYWN0aW9uX3R5cGUsdHJhbnNhY3Rpb25faWQsc3RhdHVzLHJlc3BvbnNlLGFtb3VudCxiYWxhbmNlX2JlZm9yZSxiYWxhbmNlX2FmdGVyLGRhdGUsYW1vdW50X2NoYXJnZWQsZnVsbF9yZXNwb25zZSlWQUxVRSAoPyw/LD8sPyw/LD8sPyw/LD8sPyw/LD8sPyw/KQ=='));$stmt->bind_param(base64_decode('c3Nzc3Nzc3NkZGRzZHM='),$username,$reqId,$network,$phone,$transactionType,$transactionId,$status,$response,$amount,$walletBalance,$newWalletBalance,$date,$chargedAmount,$fullResponse);$stmt->execute();$stmt->close();$stmt=$conn->prepare(base64_decode('VVBEQVRFIA==').$prefix.base64_decode('X3VzZXJzIFNFVCB3YWxsZXRfYmFsYW5jZT0/IFdIRVJFIHVzZXJuYW1lPT8='));$stmt->bind_param(base64_decode('c3M='),$newWalletBalance,$username);$stmt->execute();$stmt->close();}function recordAirtimeUpdate(){global $conn,$status,$fullResponse,$reqId,$response,$transactionId,$prefix;$stmt=$conn->prepare(base64_decode('VVBEQVRFIA==').$prefix.base64_decode('X2FpcnRpbWVfaGlzdG9yeSBTRVQgdHJhbnNhY3Rpb25faWQ9PyxzdGF0dXM9PyxyZXNwb25zZT0/LGZ1bGxfcmVzcG9uc2U9PyBXSEVSRSByZWZlcmVuY2UgPT8='));$stmt->bind_param(base64_decode('c3Nzc3M='),$transactionId,$status,$response,$fullResponse,$reqId);$stmt->execute();$stmt->close();}function reverseAirtime(){global $conn,$username,$walletBalance,$prefix,$reqId,$status;$stmt=$conn->prepare(base64_decode('VVBEQVRFIA==').$prefix.base64_decode('X2FpcnRpbWVfaGlzdG9yeSBTRVQgc3RhdHVzPT8sYmFsYW5jZV9hZnRlcj0/IFdIRVJFIHJlZmVyZW5jZSA9Pw=='));$stmt->bind_param(base64_decode('c2Rz'),$status,$walletBalance,$reqId);$stmt->execute();$stmt->close();$stmt=$conn->prepare(base64_decode('VVBEQVRFIA==').$prefix.base64_decode('X3VzZXJzIFNFVCB3YWxsZXRfYmFsYW5jZT0/IFdIRVJFIHVzZXJuYW1lPT8='));$stmt->bind_param(base64_decode('c3M='),$walletBalance,$username);$stmt->execute();$stmt->close();}$conn->close();?>

Function Calls

None

Variables

None

Stats

MD5 7b71225d977482b74844bf298b1dc058
Eval Count 0
Decode Time 53 ms