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 include_once('db.php'); $auth = new Authentication(); class Authentication{ ..

Decoded Output download

<?php  
include_once('db.php'); 
$auth = new Authentication();     
class Authentication{     
    function __construct(){ $this->db = new Db();} 
 
 
 
 
    function checkAccess($token){ 
        $result = $this->db->getUserByToken($token); 
       //var_dump(!empty($result));exit; 
         
        if(!empty($result)){ 
        if($result[0]['access']!=="DENIED"){ 
           addLog($result[0]);  
             
            return $result[0];} 
        else if($result[0]['access']=="DENIED"){ 
            return false; 
        }; 
         
             
        }else{ 
            return "TOKEN_FALSE";} 
    } 
     
     
} 
 
function addLog($dane){ 
    $d = array("Y"=>date("Y"),"m"=>date("m"),"d"=>date("d"),"H"=>date("H"),"i"=>date("i"),"s"=>date("s")); 
  
$time_stamp = $d['d']."-".$d['m']."-".$d['Y']."/".$d['H'].":".$d['i'] ;  
    //var_dump($dane);exit; 
  $file = 'logs/logi.txt'; 
// Open the file to get existing content 
$current = file_get_contents($file); 
// Append a new person to the file 
$current .=  $dane['name'] ."--". $dane['email'] ."--". $time_stamp  . "--" . $_SERVER['REMOTE_ADDR'] . "
"; 
// Write the contents back to the file 
file_put_contents($file, $current);   
     
     
} 
?>

Did this file decode correctly?

Original Code

<?php 
include_once('db.php');
$auth = new Authentication();    
class Authentication{    
    function __construct(){ $this->db = new Db();}




    function checkAccess($token){
        $result = $this->db->getUserByToken($token);
       //var_dump(!empty($result));exit;
        
        if(!empty($result)){
        if($result[0]['access']!=="DENIED"){
           addLog($result[0]); 
            
            return $result[0];}
        else if($result[0]['access']=="DENIED"){
            return false;
        };
        
            
        }else{
            return "TOKEN_FALSE";}
    }
    
    
}

function addLog($dane){
    $d = array("Y"=>date("Y"),"m"=>date("m"),"d"=>date("d"),"H"=>date("H"),"i"=>date("i"),"s"=>date("s"));
 
$time_stamp = $d['d']."-".$d['m']."-".$d['Y']."/".$d['H'].":".$d['i'] ; 
    //var_dump($dane);exit;
  $file = 'logs/logi.txt';
// Open the file to get existing content
$current = file_get_contents($file);
// Append a new person to the file
$current .=  $dane['name'] ."--". $dane['email'] ."--". $time_stamp  . "--" . $_SERVER['REMOTE_ADDR'] . "\n";
// Write the contents back to the file
file_put_contents($file, $current);  
    
    
}
?>

Function Calls

None

Variables

None

Stats

MD5 badaea76b1491dfc0aeee7c24f48e50e
Eval Count 0
Decode Time 103 ms