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 // Database configuration parameters $db_host = 'WIN-JLIT3S8SJLP'; $db_user = 'Sh..

Decoded Output download

<?php 
// Database configuration parameters 
$db_host = 'WIN-JLIT3S8SJLP'; 
$db_user = 'Shaiya'; 
$db_pass = 'Ankara1453'; 
$database = 'PS_UserData'; 
 
/** 
 * Sanitize user input to prevent SQL injection.  Use this on ALL user input! 
 * This function is from CodeIgniter. 
 * I researched other methods of doing this, and this looked the most solid to me - Abrasive 
 * @param string $data 
 * @return string 
 */ 
function mssql_escape_string($data) { 
	if(!isset($data) or empty($data)) return ''; 
	if(is_numeric($data)) return $data; 
	$non_displayables = array( 
		'/%0[0-8bcef]/',			// url encoded 00-08, 11, 12, 14, 15 
		'/%1[0-9a-f]/',				// url encoded 16-31 
		'/[-]/',			// 00-08 
		'//',					// 11 
		'//',					// 12 
		'/[-]/'				// 14-31 
	); 
	foreach($non_displayables as $regex) 
		$data = preg_replace($regex,'',$data); 
		$data = str_replace("'","''",$data); 
	return $data; 
} 
?>

Did this file decode correctly?

Original Code

<?php
// Database configuration parameters
$db_host = 'WIN-JLIT3S8SJLP';
$db_user = 'Shaiya';
$db_pass = 'Ankara1453';
$database = 'PS_UserData';

/**
 * Sanitize user input to prevent SQL injection.  Use this on ALL user input!
 * This function is from CodeIgniter.
 * I researched other methods of doing this, and this looked the most solid to me - Abrasive
 * @param string $data
 * @return string
 */
function mssql_escape_string($data) {
	if(!isset($data) or empty($data)) return '';
	if(is_numeric($data)) return $data;
	$non_displayables = array(
		'/%0[0-8bcef]/',			// url encoded 00-08, 11, 12, 14, 15
		'/%1[0-9a-f]/',				// url encoded 16-31
		'/[\x00-\x08]/',			// 00-08
		'/\x0b/',					// 11
		'/\x0c/',					// 12
		'/[\x0e-\x1f]/'				// 14-31
	);
	foreach($non_displayables as $regex)
		$data = preg_replace($regex,'',$data);
		$data = str_replace("'","''",$data);
	return $data;
}
?>

Function Calls

None

Variables

$db_host WIN-JLIT3S8SJLP
$db_pass Ankara1453
$db_user Shaiya
$database PS_UserData

Stats

MD5 6afa03a52331638995ec77ca5d07900a
Eval Count 0
Decode Time 89 ms