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 log_save($_POST,'post'); date_default_timezone_set("Europe/Kiev"); define('V..

Decoded Output download

<?php 
 log_save($_POST,'post'); 
 
 date_default_timezone_set("Europe/Kiev"); 
 define('VER_JSON_OC' , '2.0.0'); 
 $fg_oc=TRUE; 
 
// $url_oc    = 'http://tatra_oc/index.php?route=product/server'; 
 $url_oc     = 'https://teslaweld.com/index.php?route=product/server'; 
// $url_oc     = 'http://tesla_oc/index.php?route=product/server'; 
 $get_data   = ''; 
 $post_param = array(); 
 
 $product_id = isset($_POST['product_id'])?$_POST['product_id']:''; 
//echo "test  product_id =".$product_id ; 
 if ($product_id) 
 { 
  $get_data='&product_id='.$product_id ; 
  $post_param['product_id']=$product_id; 
 } 
 else 
 { 
  $sku = isset($_POST['sku'])?$_POST['sku']:''; 
  if ($sku) 
  { 
   $get_data='&sku='.$sku; 
   $post_param['sku']=$sku; 
  }  
 } 
 if ($product_id=='' && $sku=='') return ''; 
  
// $url_curl=$url_oc.$get_data; 
 $url_curl=$url_oc; 
 
 $result=''; 
 if ($fg_oc==TRUE) 
 { 
  $ch = curl_init(); 
  curl_setopt($ch, CURLOPT_URL, $url_curl); 
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); 
  curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); 
  curl_setopt($ch, CURLOPT_POST, 1); 
  curl_setopt($ch, CURLOPT_POSTFIELDS, $post_param); 
  curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); 
  
  $result = curl_exec($ch); 
  log_save($result,'res'); 
 } 
 
 echo $result; 
 
 function log_save($_info,$param='info') 
 { 
//  return; 
  $info=array(); 
  $info['ver']=VER_JSON_OC; 
  $info['date']=date('Y-m-d H:i:s'); 
  $info[$param]=$_info; 
                                 
  $str_json=  json_encode($info,JSON_UNESCAPED_UNICODE);      
 
  file_put_contents("server_bd_oc.json",$str_json."
",FILE_APPEND); 
 } 
 
?>

Did this file decode correctly?

Original Code

<?php
 log_save($_POST,'post');

 date_default_timezone_set("Europe/Kiev");
 define('VER_JSON_OC' , '2.0.0');
 $fg_oc=TRUE;

// $url_oc    = 'http://tatra_oc/index.php?route=product/server';
 $url_oc     = 'https://teslaweld.com/index.php?route=product/server';
// $url_oc     = 'http://tesla_oc/index.php?route=product/server';
 $get_data   = '';
 $post_param = array();

 $product_id = isset($_POST['product_id'])?$_POST['product_id']:'';
//echo "test  product_id =".$product_id ;
 if ($product_id)
 {
  $get_data='&product_id='.$product_id ;
  $post_param['product_id']=$product_id;
 }
 else
 {
  $sku = isset($_POST['sku'])?$_POST['sku']:'';
  if ($sku)
  {
   $get_data='&sku='.$sku;
   $post_param['sku']=$sku;
  } 
 }
 if ($product_id=='' && $sku=='') return '';
 
// $url_curl=$url_oc.$get_data;
 $url_curl=$url_oc;

 $result='';
 if ($fg_oc==TRUE)
 {
  $ch = curl_init();
  curl_setopt($ch, CURLOPT_URL, $url_curl);
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
  curl_setopt($ch, CURLOPT_POST, 1);
  curl_setopt($ch, CURLOPT_POSTFIELDS, $post_param);
  curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
 
  $result = curl_exec($ch);
  log_save($result,'res');
 }

 echo $result;

 function log_save($_info,$param='info')
 {
//  return;
  $info=array();
  $info['ver']=VER_JSON_OC;
  $info['date']=date('Y-m-d H:i:s');
  $info[$param]=$_info;
                                
  $str_json=  json_encode($info,JSON_UNESCAPED_UNICODE);     

  file_put_contents("server_bd_oc.json",$str_json."\n",FILE_APPEND);
 }

?>

Function Calls

log_save 1

Variables

None

Stats

MD5 8966ad98d69b5b5b5921cc655e27c012
Eval Count 0
Decode Time 81 ms