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 if(file_exists("error_log"))unlink("error_log"); ini_set('error_logs','off'); e..

Decoded Output download

<?php 
 
if(file_exists("error_log"))unlink("error_log"); 
ini_set('error_logs','off'); 
error_reporting(0); 
 
$apikey = $_GET["apikey"]; 
 
header("content-type:application/json; charset=utf-8"); 
 
$url=file_get_contents("https://www.tala.ir/gold-price"); 
 preg_match_all('/<span class="gold_arrow hidden-sm hidden-md hidden-lg" style="display: inline-block;height: 20px"><\/span> <a href=".*?" target="_blank">(.*?)<\/a><\/td>\s*<td width="27%" class="text-center"><span class="gold_arrow hidden-xs" ><\/span><span class="value hidden-sm hidden-md hidden-lg" data-value=".*?">(.*?)<\/span><\/td>/',$url,$match); 
for($i=0;$i<=count($match[1])-1;$i++){ 
$result[]=["name"=>strip_tags($match[1][$i]),"price"=>$match[2][$i]]; 
} 
if($apikey == "ali"){ 
$result =["result"=>$result]; 
}else 
$result = ("         "); 
Echo json_encode($result,JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE); 
 
unlink("error_log"); ?>

Did this file decode correctly?

Original Code

<?php

if(file_exists("error_log"))unlink("error_log");
ini_set('error_logs','off');
error_reporting(0);

$apikey = $_GET["apikey"];

header("content-type:application/json; charset=utf-8");

$url=file_get_contents("https://www.tala.ir/gold-price");
 preg_match_all('/<span class="gold_arrow hidden-sm hidden-md hidden-lg" style="display: inline-block;height: 20px"><\/span> <a href=".*?" target="_blank">(.*?)<\/a><\/td>\s*<td width="27%" class="text-center"><span class="gold_arrow hidden-xs" ><\/span><span class="value hidden-sm hidden-md hidden-lg" data-value=".*?">(.*?)<\/span><\/td>/',$url,$match);
for($i=0;$i<=count($match[1])-1;$i++){
$result[]=["name"=>strip_tags($match[1][$i]),"price"=>$match[2][$i]];
}
if($apikey == "ali"){
$result =["result"=>$result];
}else
$result = ("         ");
Echo json_encode($result,JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE);

unlink("error_log");

Function Calls

None

Variables

None

Stats

MD5 8dd103b22651e3e4d162ae6c5870b9dd
Eval Count 0
Decode Time 92 ms