';
$vars = func_get_args();
foreach ($vars as $var) {
echo '
';
if (is_scalar($var) || is_null($var)) {
var_dump($var);
} else {
print_r($var);
}
echo '
';
}
echo '
BACKTRACE
';
array_shift($backtrace);
function _removeObjects(&$array)
{
foreach ($array as $key => &$value) {
if (is_array($value)) {
_removeObjects($value);
} elseif (is_object($value)) {
unset($array[$key]);
$array[$key] = get_class($value) . ' Object';
}
}
}
_removeObjects($backtrace);
echo '';
print_r($backtrace);
echo '
';
$html = ob_get_contents();
ob_end_clean();
if ('XMLHttpRequest' == __getHttpHeader('X_REQUESTED_WITH')) {
$html = str_replace(array('
', '', '
'), array("\n", "\n", ''), $html);
$html = str_replace(array('
'), "\n" . str_repeat('-', 80) . "\n", $html);
}
echo $html;
exit();
}
function validateRecaptcha($g_recaptcha_response)
{
$url = 'https://www.google.com/recaptcha/api/siteverify';
$secret = '6LcY-CkUAAAAAIrJGzUAVd_bPO7iUsyNqPX5ikn8';
$data = array(
'secret' => $secret,
'response' => $g_recaptcha_response,
);
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL, $url);
curl_setopt($ch,CURLOPT_POST, 1);
curl_setopt($ch,CURLOPT_POSTFIELDS, http_build_query($data));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$result = curl_exec($ch);
curl_close($ch);
$result = json_decode($result, true);
return (bool) @$result['success'];
}
// Define path to application directory
defined('APPLICATION_PATH')
|| define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../application'));
// Define application environment
defined('APPLICATION_ENV')
|| define('APPLICATION_ENV', 'production');
// Ensure library/ is on include_path
set_include_path(implode(PATH_SEPARATOR, array(
realpath(APPLICATION_PATH . '/../library'),
get_include_path(),
)));
ini_set('include_path', ini_get('include_path') . PATH_SEPARATOR . APPLICATION_PATH . '\models');
$parts = explode(".", $_SERVER['HTTP_HOST']);
if(sizeof($parts) == 3)
{
define(SUB_DOMAIN, $parts[0]);
}
/** Zend_Application */
require_once 'Zend/Application.php';
// Create application, bootstrap, and run
$application = new Zend_Application(
APPLICATION_ENV,
APPLICATION_PATH . '/configs/application.ini'
);
$application->bootstrap()
->run();