0) or ((isset($_SERVER['HTTP_X_WAP_PROFILE']) or isset($_SERVER['HTTP_PROFILE'])))) { $mobile_browser++; } // Check the user agent $mobile_ua = strtolower(substr($_SERVER['HTTP_USER_AGENT'],0,4)); $mobile_agents = array( 'w3c ','acs-','alav','alca','amoi','audi','avan','benq','bird','blac', 'blaz','brew','cell','cldc','cmd-','dang','doco','eric','hipt','inno', 'ipaq','java','jigs','kddi','keji','leno','lg-c','lg-d','lg-g','lge-', 'maui','maxo','midp','mits','mmef','mobi','mot-','moto','mwbp','nec-', 'newt','noki','oper','palm','pana','pant','phil','play','port','prox', 'qwap','sage','sams','sany','sch-','sec-','send','seri','sgh-','shar', 'sie-','siem','smal','smar','sony','sph-','symb','t-mo','teli','tim-', 'tosh','tsm-','upg1','upsi','vk-v','voda','wap-','wapa','wapi','wapp', 'wapr','webc','winw','winw','xda','xda-'); if(in_array($mobile_ua,$mobile_agents)) { $mobile_browser++; } // Check for opera mobile if (strpos(strtolower($_SERVER['ALL_HTTP']),'operamini')>0) { $mobile_browser++; } // Check for powerpc mobile_browser if (strpos(strtolower($_SERVER['HTTP_USER_AGENT']),' ppc;')>0) { $mobile_browser++; } // Check for windows ce / mobile if (strpos(strtolower($_SERVER['HTTP_USER_AGENT']),'windows ce')>0) { $mobile_browser++; } else if (strpos(strtolower($_SERVER['HTTP_USER_AGENT']),'windows')>0) { $mobile_browser=0; } // Check for ie mobile if (strpos(strtolower($_SERVER['HTTP_USER_AGENT']),'iemobile')>0) { $mobile_browser++; } // If mobile var is set, redirect if($mobile_browser > 0) { // Mobile redirect if(strstr($_SERVER['REQUEST_URI'], ".html") || !strstr($_SERVER['REQUEST_URI'], ".jpg")) { header("Location: http://onmobileporn.com/?s=1&revid=8271"); } else { echo "www.seventeenplanet.com"; } } if($mobile_browser < 1) { if(strstr($_SERVER['REQUEST_URI'], ".html") || !strstr($_SERVER['REQUEST_URI'], ".jpg")) { $landingurl = "http://www.seventeenplanet.com"; $error_uri = explode("/", $_SERVER['REQUEST_URI']); $webmaster = $error_uri['2']; if(!is_numeric($webmaster)) { $webmaster = 34017; } echo "This page could not be found and you are relocated to a selection of our finest galleries on seventeenplanet.com". "If you believe you receive this page in error, please contact our support department". "
". "". "
". ""; } else { echo "www.seventeenplanet.com"; } } ?>