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 namespace App\Jobs; use App\Models\Order; use Illuminate\Bus\Queueable; use Illumi..
Decoded Output download
<?php
namespace App\Jobs;
use App\Models\Order;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
class ServerJiang implements ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
/**
*
*
* @var int
*/
public $tries = 2;
/**
*
*
* @var int
*/
public $timeout = 30;
/**
* @var Order
*/
private $order;
/**
* Create a new job instance.
*
* @return void
*/
public function __construct(Order $order)
{
$this->order = $order;
}
/**
* Execute the job.
*
* @return void
*/
public function handle()
{
$postdata = http_build_query([
'text' => __('dujiaoka.prompt.new_order_push') . ":{$this->order['ord_title']}",
'desp' => "
- ". __('order.fields.title') ."{$this->order->title}
- ". __('order.fields.order_sn') ."{$this->order->order_sn}
- ". __('order.fields.email') ."{$this->order->email}
- ". __('order.fields.actual_price') ."{$this->order->actual_price}
"
]);
$opts = [
'http' => [
'method' => 'POST',
'header' => 'Content-type: application/x-www-form-urlencoded',
'content' => $postdata
]
];
$context = stream_context_create($opts);
$apiToken = dujiaoka_config_get('server_jiang_token');
file_get_contents('https://sctapi.ftqq.com/' . $apiToken . '.send', false, $context);
}
}
?>
Did this file decode correctly?
Original Code
<?php
namespace App\Jobs;
use App\Models\Order;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
class ServerJiang implements ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
/**
*
*
* @var int
*/
public $tries = 2;
/**
*
*
* @var int
*/
public $timeout = 30;
/**
* @var Order
*/
private $order;
/**
* Create a new job instance.
*
* @return void
*/
public function __construct(Order $order)
{
$this->order = $order;
}
/**
* Execute the job.
*
* @return void
*/
public function handle()
{
$postdata = http_build_query([
'text' => __('dujiaoka.prompt.new_order_push') . ":{$this->order['ord_title']}",
'desp' => "
- ". __('order.fields.title') ."{$this->order->title}
- ". __('order.fields.order_sn') ."{$this->order->order_sn}
- ". __('order.fields.email') ."{$this->order->email}
- ". __('order.fields.actual_price') ."{$this->order->actual_price}
"
]);
$opts = [
'http' => [
'method' => 'POST',
'header' => 'Content-type: application/x-www-form-urlencoded',
'content' => $postdata
]
];
$context = stream_context_create($opts);
$apiToken = dujiaoka_config_get('server_jiang_token');
file_get_contents('https://sctapi.ftqq.com/' . $apiToken . '.send', false, $context);
}
}
Function Calls
None |
Stats
MD5 | 0390db54360930f492a4bfbb177e8a94 |
Eval Count | 0 |
Decode Time | 114 ms |