Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Follow me on twitter to show your sexy support? <3. @RubyFroot
- <?php
- error_reporting(0);
- $c_ip = $_SERVER['REMOTE_ADDR'];
- $lines = @file('/usr/lib/php/SpamIPs');
- if (in_array("$c_ip\n", $lines, true)){
- print "<html><head><script type=\"text/javascript\"> window.location = \"http://www.main-hosting.com/resources/?ip=$c_ip\" </script></head></html>";
- exit();
- }
- if (file_exists("/usr/lib/php/HighLoad")) die("<h2>The server is too busy at the moment.</h2><p>Please reload this page few seconds later.</p>");
- function mMM_integrity(){
- return true;
- }
- function _good_agent($c_agent){
- $c_agent = strtolower($c_agent);
- if ( (ereg("googleb", $c_agent))||(ereg("mediapa", $c_agent))||(ereg("slurp", $c_agent))||(ereg("msnb", $c_agent))||(ereg("spider", $c_agent))||(ereg("bot", $c_agent)) )
- return false;
- else return true;
- }
- $c_agent = $_SERVER['HTTP_USER_AGENT'];
- $c_domain = $_SERVER['SERVER_NAME'];
- $c_domain = str_replace("www.", "", $c_domain);
- $ckey = $_GET["ckey"];
- $free_domain = file_get_contents("/usr/lib/php/domain");
- $free_domain = str_replace("\n", "", $free_domain);
- if ( (_good_agent($c_agent))&&(!empty($c_domain))&&(!empty($c_ip))&&($ckey!="abcd") ){
- $c_path = $_SERVER["SCRIPT_FILENAME"];
- $c_uri = "http://$c_domain".$_SERVER["REQUEST_URI"];
- $c_uri = addslashes($c_uri);
- $c_date = time();
- //wordpress redirects
- $ref = $_SERVER['HTTP_REFERER'];
- if(ereg("wordpress.php",$ref)) {
- setcookie("a000webhost_wp", "$c_domain", time() + 60 * 60 * 24 * 100, "/", $c_domain);
- }
- if(ereg("wp-login.php",$_SERVER["REQUEST_URI"]) && !ereg("000webhost.com",$ref) && !ereg("wordpress.php",$_SERVER["REQUEST_URI"])) {
- $uri_enc = urlencode($c_uri);
- if(isset($_COOKIE["a000webhost_wp"]) && ereg($c_domain,$_COOKIE["a000webhost_wp"])){
- //print "uri: ". $c_uri;
- //print ", cookie:". $_COOKIE["a000webhost_wp"];
- //exit;
- } else {
- //header("Location: http://server26.000webhost.com/wordpress.php?URL=$uri_enc&ref=$ref");
- }
- }
- /////////////////////
- $c_host = "localhost";
- $c_username = "mainhost_root";
- $c_password = "eFg7Uk8oP34T";
- $c_database = "mainhost_data";
- @mysql_connect("$c_host","$c_username","$c_password");
- @mysql_select_db("$c_database");
- unset($c_host, $c_username, $c_password, $c_database);
- MYSQL_QUERY("UPDATE `visitors` SET visits=visits+1, burst=burst+1 WHERE `ip`='$c_ip'");
- if (mysql_affected_rows()==0){
- $c_first_visit = 1;
- MYSQL_QUERY("INSERT INTO `visitors` (`ip` ,`visits` ,`burst` ,`date`) VALUES ('$c_ip', '1', '1', '$c_date')");
- MYSQL_QUERY("UPDATE `traffic` SET visits=visits+1 WHERE `domain`='$c_domain'");
- if (mysql_affected_rows()==0){
- $c_reviewed = 1;
- if (ereg($free_domain, $c_domain)){
- $c_reviewed = 0;
- setcookie("siteowner", "1", time()+3000000, "/", $free_domain);
- }
- MYSQL_QUERY("INSERT INTO `traffic` (`domain`, `visits`, `ads`, `suspended`, `code`, `reviewed`, `date`)
- VALUES ('$c_domain', '1', '1', '0', '0', '$c_reviewed', '$c_date')");
- }
- }
- MYSQL_QUERY("INSERT INTO `phishing` (`domain` ,`uri` ,`title` ,`path` ,`suspended` ,`date` )
- VALUES ('$c_domain', '$c_uri', NULL, '$c_path', '0', '0')");
- $ext = substr($c_path,strlen($c_path)-4,4);
- $ext = strtolower($ext);
- if ( (($ext==".exe") or ($ext==".txt") or ($ext==".src") or ($ext==".com")) and (!ereg("robots", $c_path)) ) { header("HTTP/1.0 404 Not Found"); exit(); }
- $c_result = MYSQL_QUERY("SELECT *from `traffic` WHERE `domain`='$c_domain'");
- $c_row = mysql_fetch_array($c_result);
- if ($c_row[ads]=="1") {
- $c_ads = "yes";
- $c_uri = strtolower($c_uri);
- if ( (ereg("rss", $c_uri))||(ereg("feed", $c_uri))||(ereg("xml", $c_uri))||(ereg("js", $c_uri))||(ereg("xhtml", $c_uri)) )
- $c_ads = "no";
- }
- else $c_ads = "no";
- if (($c_row[suspended]=="1")&&($_COOKIE["siteowner"]!=1)) {
- header("Location: http://www.000webhost.com/admin-review");
- exit();
- }
- //If traffic is larger than 500, redirect to limits page
- if($c_row[visits] > 250) {
- header("Location: http://error404.000webhost.com/cpu-limit-reached.html");
- exit();
- }
- /*
- * EDIT: Commented to disable web site reviews 2012-02-27
- *
- if ( (ereg($free_domain, $c_domain))&&($c_row[visits]>=4)&&($c_row[reviewed]=="0")&&($_COOKIE["siteowner"]!=1) ){
- header("Location: http://www.000webhost.com/admin-review");
- exit();
- }
- */
- if ($c_row[code]=="3"){
- print "<br><table border='1' cellpadding='2' bgcolor='#FFFFDF' bordercolor='#E8B900' align='center'><tr><td><font face='Arial' size='3' color='#FF0000'><b>This website *may be* insecure!! If you think it is illegal, please <a href='http://www.000webhost.com/report-abuse' target='_blank'>report abuse here</a>.</b></font></td></tr></table><br />";
- }
- elseif ($c_row[code]=="4"){
- print "<table border='1' cellpadding='2' bgcolor='#FFFFDF' bordercolor='#E8B900' align='center'><tr><td><font face='Arial' size='2' color='#000000'><b>This website was set to be removed for inactivity by <a href='http://www.000webhost.com/'>www.000webhost.com</a>. If you own this website, <a href='http://www.000webhost.com/protect-website'>click here</a> to protect it.</b></font></td></tr></table><br />";
- }
- elseif ($c_row[code]=="5"){
- print "<table border='1' cellpadding='2' bgcolor='#FFFFDF' bordercolor='#E8B900' align='center'><tr><td><font face='Arial' size='2' color='#000000'><b>This account reached disk quota limit (350MB). If you are owner of this website login to FTP of File Manager and delete big or unused files. <br> Free web hosting by <a href='http://www.000webhost.com/'>www.000webhost.com</a></b></font></td></tr></table><br />";
- }
- @mysql_close();
- }
- unset($c_ip,$c_agent,$c_path,$c_uri,$c_row,$free_domain,$c_result,$ckey,$c_date,$c_reviewed,$ext);
- error_reporting(E_ALL ^ E_NOTICE);
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement