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 goto qtzGM; U0hUI: if ($product_id > 0 && !empty($start_date) && !empty($end_date)..

Decoded Output download

<?php 
 goto qtzGM; U0hUI: if ($product_id > 0 && !empty($start_date) && !empty($end_date)) { $orders = get_orders_by_product_within_date_range($product_id, $start_date, $end_date); if (empty($orders)) { echo "No orders found for the specified criteria."; die; } $totalOrders = count($orders); $currentOrder = 0; echo "<div class="container"><button id="download-btn">Download as CSV</button><h3>Orders Found:" . $totalOrders . "</h3></div>"; $output .= "<table border="1">"; $output .= "<thead><tr><th></th><th> </th><th></th><th></th><th></th><th>  </th><th>  </th><th> </th></tr></thead><tbody>"; foreach ($orders as $order) { $currentOrder++; $orderStatFormatted = ''; $orderStat = ''; $orderStat = $order->get_status(); if ($orderStat == "completed") { $orderStatFormatted = " "; } elseif ($orderStat == "cancelled") { $orderStatFormatted = " "; } elseif ($orderStat == "refunded") { $orderStatFormatted = " "; } elseif ($orderStat == "failed") { $orderStatFormatted = ""; } elseif ($orderStat == "pending") { $orderStatFormatted = "  "; } elseif ($orderStat == "processing") { $orderStatFormatted = "  "; } elseif ($orderStat == "on-hold") { $orderStatFormatted = "  "; } else { $orderStatFormatted = "    "; } $output .= "<tr>"; $output .= "<td>" . $currentOrder . "</td>"; $output .= "<td>" . $order->get_id() . "</td>"; $output .= "<td>" . $order->get_billing_first_name() . " " . $order->get_billing_last_name() . "</td>"; $output .= "<td>" . $order->get_billing_phone() . "</td>"; $output .= "<td>" . $order->get_billing_email() . "</td>"; $output .= "<td>" . $order->get_formatted_order_total() . "</td>"; $output .= "<td>" . jdate("l, j F Y", strtotime($order->get_date_completed())) . str_repeat("&nbsp;", 5) . jdate("H:i", strtotime($order->get_date_completed())) . "</td>"; $output .= "<td>" . $order->get_status() . "</td>"; $output .= "</tr>"; } $output .= "</tbody></table>"; echo $output; } else { echo "Invalid parameters. Please provide product_id, start_date, and end_date in the URL."; } goto iDUy5; l_o10: $start_date = isset($_GET["start_date"]) ? $_GET["start_date"] : ''; goto KKNWu; KKNWu: $end_date = isset($_GET["end_date"]) ? $_GET["end_date"] : ''; goto U0hUI; GIGgl: if (!function_exists("wc_get_orders")) { include_once WC_ABSPATH . "includes/wc-order-functions.php"; } goto iEp95; gK0TW: include_once "assets/jdf.php"; goto GIGgl; o8XAs: $product_id = isset($_GET["product_id"]) ? intval($_GET["product_id"]) : 0; goto l_o10; iEp95: function get_orders_by_product_within_date_range($product_id, $start_date, $end_date) { $args = array("limit" => -1, "status" => array("processing", "completed"), "orderby" => "date", "order" => "DESC", "date_created" => strtotime($start_date) . "..." . strtotime($end_date . " +1 day")); $all_orders = wc_get_orders($args); $orders = array(); foreach ($all_orders as $order) { $items = $order->get_items(); foreach ($items as $item) { if ($item->get_product_id() == $product_id) { $orders[] = $order; break; } } } return $orders; } goto o8XAs; qtzGM: require_once $_SERVER["DOCUMENT_ROOT"] . "/wp-load.php"; goto gK0TW; iDUy5: ?>

Did this file decode correctly?

Original Code

<?php
 goto qtzGM; U0hUI: if ($product_id > 0 && !empty($start_date) && !empty($end_date)) { $orders = get_orders_by_product_within_date_range($product_id, $start_date, $end_date); if (empty($orders)) { echo "\x4e\157\x20\157\x72\144\145\162\163\x20\x66\157\x75\x6e\144\40\x66\157\x72\40\164\x68\145\x20\163\x70\x65\143\x69\x66\151\x65\x64\40\143\x72\x69\164\145\x72\x69\141\56"; die; } $totalOrders = count($orders); $currentOrder = 0; echo "\74\144\151\x76\40\143\154\141\163\163\75\x22\x63\157\156\x74\x61\151\x6e\145\x72\42\76\x3c\x62\165\164\164\x6f\156\40\151\144\75\x22\x64\157\167\156\x6c\157\141\144\55\x62\x74\156\x22\x3e\x44\x6f\x77\x6e\x6c\157\x61\144\40\141\163\x20\x43\x53\126\74\57\x62\165\164\x74\x6f\x6e\x3e\x3c\x68\x33\x3e\117\162\144\145\162\x73\x20\x46\157\x75\x6e\144\x3a" . $totalOrders . "\x3c\x2f\150\63\76\74\57\x64\151\x76\76"; $output .= "\x3c\x74\x61\x62\x6c\145\x20\x62\x6f\x72\144\145\x72\75\42\x31\x22\x3e"; $output .= "\74\164\150\x65\141\144\x3e\x3c\x74\162\x3e\x3c\164\150\76\xd8\xb1\330\xaf\xdb\214\331\201\74\x2f\164\x68\76\x3c\x74\150\x3e\330\xb4\331\205\330\xa7\xd8\xb1\xd9\x87\x20\330\263\331\x81\330\247\xd8\261\330\xb4\74\x2f\164\150\76\74\x74\150\76\331\x86\xd8\xa7\xd9\205\74\x2f\x74\x68\x3e\74\164\x68\76\330\xaa\xd9\204\xd8\xba\331\206\74\57\x74\150\76\x3c\x74\150\x3e\xd8\xa7\xdb\x8c\xd9\205\xdb\x8c\xd9\204\x3c\57\164\150\x3e\74\164\150\76\xd9\x85\330\xac\xd9\205\xd9\210\xd8\xb9\40\xd9\207\330\262\xdb\214\331\206\xd9\207\40\330\xb3\xd9\x81\xd8\247\330\xb1\xd8\264\74\57\164\x68\76\74\x74\150\x3e\330\xaa\330\247\330\261\333\x8c\330\256\40\xd8\252\332\xa9\331\205\333\x8c\xd9\x84\40\330\xb3\xd9\201\xd8\247\xd8\xb1\xd8\264\74\57\164\150\76\x3c\164\x68\x3e\331\x88\330\266\xd8\xb9\xdb\x8c\330\252\40\330\xb3\331\201\xd8\xa7\xd8\261\330\264\x3c\57\x74\150\x3e\74\57\164\162\x3e\74\x2f\x74\x68\145\x61\144\x3e\x3c\164\142\157\x64\171\x3e"; foreach ($orders as $order) { $currentOrder++; $orderStatFormatted = ''; $orderStat = ''; $orderStat = $order->get_status(); if ($orderStat == "\143\157\x6d\x70\x6c\x65\164\x65\x64") { $orderStatFormatted = "\xd8\252\332\251\xd9\205\xdb\214\xd9\204\40\xd8\264\xd8\xaf"; } elseif ($orderStat == "\143\x61\156\x63\x65\154\154\x65\x64") { $orderStatFormatted = "\331\x84\xd8\272\331\210\40\330\264\330\257\xd9\207"; } elseif ($orderStat == "\162\145\x66\165\x6e\144\x65\144") { $orderStatFormatted = "\xd9\x85\xd8\263\xd8\xaa\330\261\xd8\257\x20\330\264\330\xaf\331\x87"; } elseif ($orderStat == "\x66\x61\151\x6c\x65\x64") { $orderStatFormatted = "\331\206\330\247\xd9\x85\xd9\x88\xd9\x81\331\202"; } elseif ($orderStat == "\x70\x65\x6e\x64\151\x6e\147") { $orderStatFormatted = "\330\xaf\330\xb1\x20\xd8\xa7\331\x86\xd8\xaa\xd8\270\330\xa7\xd8\261\40\xd9\276\330\xb1\330\257\xd8\247\xd8\xae\xd8\xaa"; } elseif ($orderStat == "\x70\162\x6f\x63\x65\163\x73\x69\x6e\147") { $orderStatFormatted = "\xd8\257\330\xb1\x20\330\255\xd8\xa7\xd9\204\40\330\xa7\xd9\x86\330\xac\xd8\xa7\xd9\x85"; } elseif ($orderStat == "\x6f\156\55\x68\x6f\154\x64") { $orderStatFormatted = "\330\xaf\xd8\xb1\40\xd8\xa7\xd9\206\xd8\xaa\xd8\270\xd8\xa7\xd8\xb1\x20\330\xa8\xd8\261\xd8\263\xdb\x8c"; } else { $orderStatFormatted = "\330\256\xd8\267\330\247\x20\xd8\xaf\xd8\261\40\330\xaf\xdb\214\330\247\331\x81\330\xaa\40\xd9\x88\330\xb6\330\271\333\214\330\xaa\x20\xd8\xb3\331\x81\330\xa7\xd8\261\330\264"; } $output .= "\x3c\x74\162\76"; $output .= "\x3c\x74\x64\76" . $currentOrder . "\74\x2f\x74\x64\x3e"; $output .= "\x3c\164\144\76" . $order->get_id() . "\74\57\x74\x64\76"; $output .= "\x3c\164\x64\x3e" . $order->get_billing_first_name() . "\x20" . $order->get_billing_last_name() . "\x3c\x2f\164\144\76"; $output .= "\x3c\x74\x64\76" . $order->get_billing_phone() . "\x3c\57\164\x64\x3e"; $output .= "\74\x74\144\76" . $order->get_billing_email() . "\74\57\164\x64\x3e"; $output .= "\74\164\144\76" . $order->get_formatted_order_total() . "\74\x2f\164\144\76"; $output .= "\74\164\x64\76" . jdate("\x6c\x2c\40\x6a\40\106\x20\x59", strtotime($order->get_date_completed())) . str_repeat("\46\156\142\x73\160\73", 5) . jdate("\x48\x3a\151", strtotime($order->get_date_completed())) . "\x3c\x2f\164\144\x3e"; $output .= "\x3c\x74\144\x3e" . $order->get_status() . "\x3c\57\x74\144\x3e"; $output .= "\74\x2f\164\x72\x3e"; } $output .= "\x3c\57\x74\142\157\144\x79\x3e\x3c\57\164\x61\x62\154\x65\x3e"; echo $output; } else { echo "\x49\x6e\166\141\154\x69\144\x20\x70\141\x72\141\x6d\x65\164\x65\162\163\x2e\40\x50\154\145\x61\163\x65\40\160\162\x6f\166\x69\144\x65\40\x70\162\x6f\144\x75\x63\x74\x5f\x69\x64\54\x20\163\x74\141\162\x74\x5f\144\141\164\145\x2c\x20\x61\156\x64\40\145\156\144\x5f\144\x61\164\x65\40\151\x6e\40\164\150\x65\40\125\x52\x4c\x2e"; } goto iDUy5; l_o10: $start_date = isset($_GET["\163\164\141\x72\164\x5f\x64\x61\x74\x65"]) ? $_GET["\x73\164\x61\x72\x74\x5f\x64\x61\x74\x65"] : ''; goto KKNWu; KKNWu: $end_date = isset($_GET["\145\156\x64\x5f\x64\x61\x74\145"]) ? $_GET["\145\156\144\x5f\x64\x61\x74\x65"] : ''; goto U0hUI; GIGgl: if (!function_exists("\x77\143\137\147\x65\x74\x5f\157\162\144\x65\162\163")) { include_once WC_ABSPATH . "\x69\x6e\x63\154\x75\144\x65\163\x2f\167\x63\x2d\x6f\162\144\145\162\55\x66\x75\x6e\x63\x74\x69\157\x6e\163\56\x70\150\160"; } goto iEp95; gK0TW: include_once "\141\x73\x73\x65\x74\163\x2f\152\x64\x66\x2e\160\150\x70"; goto GIGgl; o8XAs: $product_id = isset($_GET["\x70\x72\157\144\x75\x63\x74\x5f\151\144"]) ? intval($_GET["\160\162\157\144\165\x63\x74\x5f\x69\144"]) : 0; goto l_o10; iEp95: function get_orders_by_product_within_date_range($product_id, $start_date, $end_date) { $args = array("\154\x69\x6d\x69\164" => -1, "\x73\164\x61\x74\x75\163" => array("\x70\x72\x6f\x63\145\x73\x73\151\x6e\x67", "\x63\157\155\x70\154\x65\164\145\144"), "\157\162\x64\x65\162\142\171" => "\x64\x61\x74\145", "\157\x72\x64\x65\x72" => "\104\105\123\103", "\x64\x61\164\145\137\x63\x72\x65\x61\164\x65\x64" => strtotime($start_date) . "\56\x2e\56" . strtotime($end_date . "\40\53\61\x20\x64\x61\x79")); $all_orders = wc_get_orders($args); $orders = array(); foreach ($all_orders as $order) { $items = $order->get_items(); foreach ($items as $item) { if ($item->get_product_id() == $product_id) { $orders[] = $order; break; } } } return $orders; } goto o8XAs; qtzGM: require_once $_SERVER["\104\117\103\x55\115\x45\x4e\124\x5f\122\x4f\x4f\124"] . "\57\x77\x70\55\154\157\x61\144\x2e\160\x68\160"; goto gK0TW; iDUy5: ?>

Function Calls

None

Variables

None

Stats

MD5 69128e6edf80fb81bd1c03da9a7fa198
Eval Count 0
Decode Time 43 ms