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 class Cronjobs extends CI_Controller { public function __construct() { parent::__c..
Decoded Output download
<?php
class Cronjobs extends CI_Controller { public function __construct() { parent::__construct(); $this->load->database(); } protected function call_curl($url) { $curl = curl_init(); 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 => "GET")); $response = curl_exec($curl); curl_close($curl); return $response; } public function get_index() { $this->get_pgorder(); } public function get_pgorder($last_id = 0) { if (isset($last_id) && $last_id > 0) { $this->db->where("id", $last_id); } $details = $this->db->select("id,userid,orderid,package_id")->where(array("paymentstatus" => '', "type" => 1))->order_by("id", "desc")->get("pg_order")->result(); if (!empty($details)) { foreach ($details as $det) { $pack_id = $det->package_id ?? NULL; $url = "https://indianpay.co.in/admin/payinstatus?order_id={$det->orderid}"; $response = $this->call_curl($url); $value = json_decode($response, true); if (!empty($value)) { $order_id = $value["transactionid"]; $status = $value["status"]; $utr_no = $value["utr"]; $amount = $value["amount"]; $time = $value["date"] ?? date("Y-m-d H:i:s"); if ($status != "pending") { $this->db->where("orderid", $order_id)->update("pg_order", array("paymentstatus" => $status, "paymentid" => $utr_no)); if ($this->db->affected_rows() > 0 && $status == "success") { $array = array("request_points" => $amount, "time" => $time, "user_id" => $det->userid, "type" => "Add", "request_status" => "approved", "txn_id" => $order_id, "payment_type" => 2); $this->db->insert("tblRequest", $array); if ($this->db->affected_rows() > 0) { $old_balance = $this->db->select("main_wallet_points")->where("user_id", $det->userid)->get("tblwallet")->row()->main_wallet_points ?? 0; $this->db->where("user_id", $det->userid)->update("tblwallet", array("main_wallet_points" => $old_balance + $amount)); if ($pack_id != '' && $pack_id > 0) { $package = $this->db->select("cashback")->where("id", $pack_id)->where("status", 1)->get("package")->row() ?? NULL; if ($package) { $cashback = $package->cashback; $requestData = array("request_points" => $cashback, "user_id" => $det->userid, "request_status" => "approved", "type" => "Add", "txn_id" => NULL, "comment" => "Cashback Added on adding Rs {$amount}"); $this->db->insert("tblRequest", $requestData); if ($this->db->affected_rows() > 0) { $this->db->set("main_wallet_points", "main_wallet_points + {$cashback}", FALSE)->where("user_id", $det->userid)->update("tblwallet"); } } } else { $package = $this->db->select("cashback")->where("amount", $amount)->where("status", 1)->get("package")->row() ?? NULL; if ($package) { $cashback = $package->cashback; $requestData = array("request_points" => $cashback, "user_id" => $det->userid, "request_status" => "approved", "type" => "Add", "txn_id" => NULL, "comment" => "Cashback Added on adding Rs {$amount}"); $this->db->insert("tblRequest", $requestData); if ($this->db->affected_rows() > 0) { $this->db->set("main_wallet_points", "main_wallet_points + {$cashback}", FALSE)->where("user_id", $det->userid)->update("tblwallet"); } } } } } } } } } return true; } protected function excute_curl($json = '') { if ($json != '') { $curl = curl_init(); curl_setopt_array($curl, array(CURLOPT_URL => "https://indianpay.co.in/admin/single_transaction", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => '', CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_POSTFIELDS => json_encode($json), CURLOPT_HTTPHEADER => array("Content-Type: application/json"))); $response = curl_exec($curl); curl_close($curl); return $response; } else { return false; } } } ?>
Did this file decode correctly?
Original Code
<?php
class Cronjobs extends CI_Controller { public function __construct() { parent::__construct(); $this->load->database(); } protected function call_curl($url) { $curl = curl_init(); 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 => "\x47\x45\x54")); $response = curl_exec($curl); curl_close($curl); return $response; } public function get_index() { $this->get_pgorder(); } public function get_pgorder($last_id = 0) { if (isset($last_id) && $last_id > 0) { $this->db->where("\x69\x64", $last_id); } $details = $this->db->select("\151\x64\54\165\x73\x65\162\151\144\x2c\157\162\144\x65\162\x69\144\54\160\141\143\153\141\147\145\x5f\151\x64")->where(array("\x70\x61\x79\155\x65\156\x74\x73\x74\x61\x74\x75\163" => '', "\164\x79\160\x65" => 1))->order_by("\151\x64", "\x64\145\163\143")->get("\160\x67\x5f\157\x72\x64\145\162")->result(); if (!empty($details)) { foreach ($details as $det) { $pack_id = $det->package_id ?? NULL; $url = "\x68\x74\x74\x70\x73\x3a\57\57\151\x6e\x64\151\x61\x6e\x70\x61\x79\x2e\x63\157\x2e\x69\156\x2f\x61\x64\x6d\x69\156\x2f\x70\x61\171\x69\156\x73\x74\141\x74\x75\x73\x3f\x6f\x72\144\x65\162\137\x69\x64\75{$det->orderid}"; $response = $this->call_curl($url); $value = json_decode($response, true); if (!empty($value)) { $order_id = $value["\x74\x72\141\156\163\141\143\x74\x69\157\156\151\x64"]; $status = $value["\163\164\141\164\165\x73"]; $utr_no = $value["\165\164\x72"]; $amount = $value["\141\155\x6f\x75\156\x74"]; $time = $value["\x64\x61\x74\145"] ?? date("\x59\x2d\x6d\x2d\144\40\110\x3a\151\x3a\163"); if ($status != "\x70\145\156\144\x69\156\x67") { $this->db->where("\x6f\162\x64\x65\x72\x69\x64", $order_id)->update("\x70\x67\x5f\157\x72\144\145\x72", array("\160\141\x79\x6d\145\156\x74\163\164\141\x74\165\163" => $status, "\x70\x61\x79\x6d\145\156\164\x69\x64" => $utr_no)); if ($this->db->affected_rows() > 0 && $status == "\x73\165\x63\143\x65\x73\163") { $array = array("\x72\145\x71\x75\x65\163\x74\x5f\x70\157\x69\x6e\x74\x73" => $amount, "\164\151\155\x65" => $time, "\x75\163\145\162\137\151\144" => $det->userid, "\x74\171\160\x65" => "\101\x64\x64", "\x72\x65\x71\x75\145\163\x74\137\163\x74\x61\164\x75\x73" => "\141\160\x70\x72\x6f\166\x65\144", "\x74\170\x6e\137\x69\144" => $order_id, "\x70\141\x79\x6d\145\156\x74\137\x74\x79\160\x65" => 2); $this->db->insert("\164\142\x6c\122\x65\161\x75\145\x73\x74", $array); if ($this->db->affected_rows() > 0) { $old_balance = $this->db->select("\155\141\151\x6e\137\x77\141\x6c\154\145\x74\x5f\160\x6f\151\x6e\164\163")->where("\x75\163\145\x72\x5f\x69\x64", $det->userid)->get("\x74\142\154\167\x61\154\154\x65\x74")->row()->main_wallet_points ?? 0; $this->db->where("\165\163\145\x72\137\151\x64", $det->userid)->update("\x74\x62\154\x77\x61\x6c\x6c\145\x74", array("\155\141\151\x6e\137\x77\141\154\154\145\164\137\x70\x6f\x69\x6e\x74\x73" => $old_balance + $amount)); if ($pack_id != '' && $pack_id > 0) { $package = $this->db->select("\143\141\163\x68\x62\141\143\x6b")->where("\151\x64", $pack_id)->where("\x73\x74\141\x74\x75\163", 1)->get("\x70\x61\143\153\x61\x67\x65")->row() ?? NULL; if ($package) { $cashback = $package->cashback; $requestData = array("\162\145\x71\165\x65\163\164\137\160\x6f\x69\x6e\164\x73" => $cashback, "\x75\x73\145\162\x5f\x69\144" => $det->userid, "\162\145\161\x75\x65\163\164\x5f\163\164\x61\x74\x75\x73" => "\x61\160\160\162\157\x76\145\144", "\164\171\x70\x65" => "\101\x64\x64", "\x74\x78\x6e\137\151\x64" => NULL, "\x63\x6f\x6d\155\145\x6e\x74" => "\103\141\x73\150\142\x61\x63\x6b\x20\101\x64\144\x65\144\x20\157\x6e\x20\x61\144\144\151\156\147\x20\122\x73\x20{$amount}"); $this->db->insert("\164\142\154\122\x65\161\x75\x65\x73\x74", $requestData); if ($this->db->affected_rows() > 0) { $this->db->set("\155\141\x69\156\137\167\141\154\x6c\145\164\x5f\160\x6f\151\x6e\164\163", "\x6d\141\x69\x6e\x5f\167\x61\154\154\145\164\137\x70\157\x69\156\x74\x73\40\53\x20{$cashback}", FALSE)->where("\165\x73\x65\x72\137\x69\144", $det->userid)->update("\164\x62\154\x77\x61\x6c\x6c\145\164"); } } } else { $package = $this->db->select("\143\141\x73\x68\142\x61\x63\x6b")->where("\141\x6d\157\x75\156\x74", $amount)->where("\x73\x74\x61\x74\165\163", 1)->get("\x70\x61\143\153\x61\147\x65")->row() ?? NULL; if ($package) { $cashback = $package->cashback; $requestData = array("\162\x65\x71\165\x65\163\164\x5f\160\157\151\x6e\x74\x73" => $cashback, "\x75\163\145\162\x5f\151\x64" => $det->userid, "\x72\145\x71\x75\x65\x73\x74\x5f\x73\164\141\x74\x75\x73" => "\x61\x70\x70\x72\157\x76\x65\x64", "\x74\x79\160\x65" => "\101\x64\x64", "\x74\170\x6e\137\151\x64" => NULL, "\x63\x6f\155\155\x65\156\164" => "\103\141\163\150\x62\141\143\x6b\40\x41\144\144\x65\x64\x20\157\x6e\x20\x61\144\x64\x69\156\147\40\x52\x73\x20{$amount}"); $this->db->insert("\164\x62\x6c\x52\145\161\x75\145\x73\x74", $requestData); if ($this->db->affected_rows() > 0) { $this->db->set("\x6d\141\151\156\x5f\x77\x61\x6c\x6c\x65\164\x5f\160\157\x69\156\164\x73", "\x6d\x61\151\156\x5f\167\x61\x6c\154\145\164\137\x70\157\x69\x6e\x74\163\40\53\x20{$cashback}", FALSE)->where("\x75\163\x65\162\x5f\151\x64", $det->userid)->update("\164\142\x6c\167\x61\x6c\154\x65\164"); } } } } } } } } } return true; } protected function excute_curl($json = '') { if ($json != '') { $curl = curl_init(); curl_setopt_array($curl, array(CURLOPT_URL => "\x68\164\164\x70\163\x3a\57\x2f\x69\156\144\151\141\x6e\160\x61\171\x2e\x63\x6f\x2e\x69\x6e\57\141\144\x6d\x69\x6e\x2f\163\x69\156\x67\154\145\x5f\x74\162\x61\x6e\163\x61\143\164\151\x6f\156", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => '', CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "\120\117\123\x54", CURLOPT_POSTFIELDS => json_encode($json), CURLOPT_HTTPHEADER => array("\103\x6f\156\x74\145\156\164\55\124\171\x70\x65\72\40\141\160\x70\154\151\x63\x61\x74\151\x6f\156\57\x6a\x73\157\156"))); $response = curl_exec($curl); curl_close($curl); return $response; } else { return false; } } }
Function Calls
None |
Stats
MD5 | 84b3395aed75fa81f6012bd97498411d |
Eval Count | 0 |
Decode Time | 77 ms |