' . join('|', $known) . ')[/ ]+(?[0-9.|a-zA-Z.]*)#'; if (!preg_match_all($pattern, $u_agent, $matches)) { // we have no matching number just continue } // see how many we have $i = count($matches['browser']); if ($i != 1) { //we will have two since we are not using 'other' argument yet //see if version is before or after the name if (strripos($u_agent,"Version") < strripos($u_agent,$ub)){ $version= $matches['version'][0]; } else { $version= $matches['version'][1]; } } else { $version= $matches['version'][0]; } // check if we have a number if ($version==null || $version=="") {$version="?";} return array( 'userAgent' => $u_agent, 'name' => $bname, 'version' => $version, 'platform' => $platform, 'pattern' => $pattern ); } // now try it $ua=getBrowser(); $yourbrowser= "Your browser: " . $ua['name'] . " " . $ua['version'] . " on " .$ua['platform'] . " reports:
" . $ua['userAgent']; $browser_name = $ua['name'] ; $browser_version =$ua['version'] ; $computer_system =$ua['platform'] ; $user_agent = $ua['userAgent']; //echo $browser_name."+".$browser_version."+".$computer_system."+".$user_agent; //print_r($yourbrowser); //STEVE you are limited to 120 geo lookups per minute. This stops bots from counting for geo location function is_bot($user_agent) { $botRegexPattern = "(googlebot\/|Googlebot\-Mobile|Googlebot\-Image|Google favicon|Mediapartners\-Google|bingbot|slurp|java|wget|curl|Commons\-HttpClient|Python\-urllib|libwww|httpunit|nutch|phpcrawl|msnbot|jyxobot|FAST\-WebCrawler|FAST Enterprise Crawler|biglotron|teoma|convera|seekbot|gigablast|exabot|ngbot|ia_archiver|GingerCrawler|webmon |httrack|webcrawler|grub\.org|UsineNouvelleCrawler|antibot|netresearchserver|speedy|fluffy|bibnum\.bnf|findlink|msrbot|panscient|yacybot|AISearchBot|IOI|ips\-agent|tagoobot|MJ12bot|dotbot|woriobot|yanga|buzzbot|mlbot|yandexbot|purebot|Linguee Bot|Voyager|CyberPatrol|voilabot|baiduspider|citeseerxbot|spbot|twengabot|postrank|turnitinbot|scribdbot|page2rss|sitebot|linkdex|Adidxbot|blekkobot|ezooms|dotbot|Mail\.RU_Bot|discobot|heritrix|findthatfile|europarchive\.org|NerdByNature\.Bot|sistrix crawler|ahrefsbot|Aboundex|domaincrawler|wbsearchbot|summify|ccbot|edisterbot|seznambot|ec2linkfinder|gslfbot|aihitbot|intelium_bot|facebookexternalhit|yeti|RetrevoPageAnalyzer|lb\-spider|sogou|lssbot|careerbot|wotbox|wocbot|ichiro|DuckDuckBot|lssrocketcrawler|drupact|webcompanycrawler|acoonbot|openindexspider|gnam gnam spider|web\-archive\-net\.com\.bot|backlinkcrawler|coccoc|integromedb|content crawler spider|toplistbot|seokicks\-robot|it2media\-domain\-crawler|ip\-web\-crawler\.com|siteexplorer\.info|elisabot|proximic|changedetection|blexbot|arabot|WeSEE:Search|niki\-bot|CrystalSemanticsBot|rogerbot|360Spider|psbot|InterfaxScanBot|Lipperhey SEO Service|CC Metadata Scaper|g00g1e\.net|GrapeshotCrawler|urlappendbot|brainobot|fr\-crawler|binlar|SimpleCrawler|Livelapbot|Twitterbot|cXensebot|smtbot|bnf\.fr_bot|A6\-Indexer|ADmantX|Facebot|Twitterbot|OrangeBot|memorybot|AdvBot|MegaIndex|SemanticScholarBot|ltx71|nerdybot|xovibot|BUbiNG|Qwantify|archive\.org_bot|Applebot|TweetmemeBot|crawler4j|findxbot|SemrushBot|yoozBot|lipperhey|y!j\-asr|Domain Re\-Animator Bot|AddThis)"; return preg_match("/{$botRegexPattern}/", $user_agent); } //if it's a bot then label it if ( is_bot($_SERVER['HTTP_USER_AGENT']) ) { $BotAlert = "Bot [".$user_agent."]"; }else{ $BotAlert = "Not Bot]"; } if ( !is_bot($_SERVER['HTTP_USER_AGENT']) ) { //STEVE genius code to get the address of a site visitor and their geo location geolocation function ip_info($ip = NULL, $purpose = "location", $deep_detect = TRUE) { $output = NULL; if (filter_var($ip, FILTER_VALIDATE_IP) === FALSE) { $ip = $_SERVER["REMOTE_ADDR"]; if ($deep_detect) { if (filter_var(@$_SERVER['HTTP_X_FORWARDED_FOR'], FILTER_VALIDATE_IP)) $ip = $_SERVER['HTTP_X_FORWARDED_FOR']; if (filter_var(@$_SERVER['HTTP_CLIENT_IP'], FILTER_VALIDATE_IP)) $ip = $_SERVER['HTTP_CLIENT_IP']; } } $purpose = str_replace(array("name", "\n", "\t", " ", "-", "_"), NULL, strtolower(trim($purpose))); $support = array("country", "countrycode", "state", "region", "city", "location", "address"); $continents = array( "AF" => "Africa", "AN" => "Antarctica", "AS" => "Asia", "EU" => "Europe", "OC" => "Australia (Oceania)", "NA" => "North America", "SA" => "South America" ); if (filter_var($ip, FILTER_VALIDATE_IP) && in_array($purpose, $support)) { $ipdat = @json_decode(file_get_contents("http://www.geoplugin.net/json.gp?ip=" . $ip)); if (@strlen(trim($ipdat->geoplugin_countryCode)) == 2) { switch ($purpose) { case "location": $output = array( "city" => @$ipdat->geoplugin_city, "state" => @$ipdat->geoplugin_regionName, "country" => @$ipdat->geoplugin_countryName, "country_code" => @$ipdat->geoplugin_countryCode, "continent" => @$continents[strtoupper($ipdat->geoplugin_continentCode)], "continent_code" => @$ipdat->geoplugin_continentCode ); break; case "address": $address = array($ipdat->geoplugin_countryName); if (@strlen($ipdat->geoplugin_regionName) >= 1) $address[] = $ipdat->geoplugin_regionName; if (@strlen($ipdat->geoplugin_city) >= 1) $address[] = $ipdat->geoplugin_city; $output = implode(", ", array_reverse($address)); break; case "city": $output = @$ipdat->geoplugin_city; break; case "state": $output = @$ipdat->geoplugin_regionName; break; case "region": $output = @$ipdat->geoplugin_regionName; break; case "country": $output = @$ipdat->geoplugin_countryName; break; case "countrycode": $output = @$ipdat->geoplugin_countryCode; break; } } } return $output; } //echo ip_info("Visitor", "Country"); // India //echo ip_info("Visitor", "Country Code"); // IN //echo ip_info("Visitor", "State"); // Andhra Pradesh //echo ip_info("Visitor", "City"); // Proddatur //echo ip_info("Visitor", "Address"); // Proddatur, Andhra Pradesh, India $country_code = ip_info("Visitor", "Country Code"); $state = ip_info("Visitor", "State"); $city = ip_info("Visitor", "City"); // Proddatur $origincountry = ip_info("Visitor", "Country"); $geolocation = ip_info("Visitor", "Address"); //print_r(ip_info("Visitor", "Location")); // Array ( [city] => Proddatur [state] => Andhra Pradesh [country] => India [country_code] => IN [continent] => Asia [continent_code] => AS ) } //end geo bot check if (isSet($_SERVER)) { if (isSet($_SERVER["HTTP_X_FORWARDED_FOR"])) { $ipaddress = $_SERVER["HTTP_X_FORWARDED_FOR"]; } elseif (isSet($_SERVER["HTTP_CLIENT_IP"])) { $ipaddress = $_SERVER["HTTP_CLIENT_IP"]; } else { $ipaddress = $_SERVER["REMOTE_ADDR"]; } } else { if ( getenv( 'HTTP_X_FORWARDED_FOR' ) ) { $ipaddress = getenv( 'HTTP_X_FORWARDED_FOR' ); } elseif ( getenv( 'HTTP_CLIENT_IP' ) ) { $ipaddress = getenv( 'HTTP_CLIENT_IP' ); } else { $ipaddress = getenv( 'REMOTE_ADDR' ); } } // if ($ipaddress =="178.2.22.196") //test for my ip if ($ipaddress =="68.192.223.134") //{ //echo("
Du gehst mir voll auf den Sack!

die Drecksau!
"); //COOKIE HANDLER - CHECK IF RETURN VISITOR! if (isset($_COOKIE["SPVisitor"])) { //auto refresh to human view //header("location: http://www.shurikenproductions.com?human=VIP"); //exit; $returnVisitor = "Return Site Visitor"; $vCOOKIE = $_COOKIE["SPVisitor"]; //echo "on".$vCOOKIE; $boundaryid = uniqid("msg_id_"); } else { $vCOOKIE = ""; $boundaryid = uniqid("msg_id_"); $returnVisitor = "New Site Visitor"; setcookie("SPVisitor",$boundaryid."-".$ipaddress, time()+60*60*24*30*6); } //Test to see if human or robot. If Human, will click View Site button and usually allow cookie. Robots wont. if (isset($vCOOKIE)) { //echo $_POST['view']; $humanview = "human"; } else { $humanview = "robot"; } //if they havent pressed enter but they have a cookie as a return visitor, send to main page if (isset($_COOKIE["SPVisitor"])) { $vCOOKIE = $_COOKIE["SPVisitor"]; //header("location: http://www.shurikenproductions.com?s=$vCOOKIE"); } $strMsg = "ShurikenProductions.com got a ".$humanview." - ".$returnVisitor." hit on Zillow 3D Home Tour Sample!

Date: ".date("F j, Y, g:i a")."

SECURITY CHECK: ------------------------------------------------------

"; $strMsg .= "Bot Crawler Alert: ".$BotAlert."
"; $actual_link = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http") . "://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"; $strMsg .= "Hit Page URL: ".$actual_link."
"; if (isset($geolocation)){$strMsg .= "GEO Location: ".$geolocation."
";}else{$strMsg .= "GEO Location: UNKNOWN
";} $strMsg .= "Cookie: ".$vCOOKIE."
"; $strMsg .= "IP Address: ".$ipaddress."
"; if(isset($_SERVER['REMOTE_HOST'])) {$hostname = $_SERVER['REMOTE_HOST'];$strMsg .= "Host Address: ".$hostname."
";}else{$hostname ="";} if(isset($_SERVER['REMOTE_ADDR'])) {$hostname2 = $_SERVER['REMOTE_ADDR'];$strMsg .= "Host Address2: ".$hostname2."
";}else{$hostname2 ="";} if($hostname != $hostname2) { // get the host name per dns call $hostname = gethostbyaddr($_SERVER['REMOTE_ADDR']); } $hostname3 = gethostbyaddr($_SERVER['REMOTE_ADDR']); $strMsg .= "Host Address DNS: ".$hostname."
"; $strMsg .= "Host Address: ".$hostname."
"; $strMsg .= "View Type: ".$viewtypeval."
"; $method = getenv("REQUEST_METHOD"); $strMsg .= "Method: ".$method."
"; $software = getenv("SERVER_SOFTWARE"); $strMsg .= "Software: ".$software."
"; $strMsg .= "browser_name: ".$browser_name."
"; $strMsg .= "browser_version: ".$browser_version."
"; $strMsg .= "computer_system: ".$computer_system."
"; $strMsg .= "user_agent: ".$user_agent."
"; //echo $strMsg; $subject ="Shuriken Hit: Zillow 3D Tour - ".$ipaddress; ///// NEW SMTP AUTH SCRIPT $recipientx = "support@shurikenproductions.com"; require_once "../PHPMailer/PHPMailerAutoload.php"; $mail = new PHPMailer; //Enable SMTP debugging =1. $mail->SMTPDebug = 0; //Set PHPMailer to use SMTP. $mail->isSMTP(); //Set SMTP host name //$mail->Host = "mail.sclafanibrands.com"; $mail->Host = "p3plcpnl0784.prod.phx3.secureserver.net"; //Set this to true if SMTP host requires authentication to send email $mail->SMTPAuth = true; //Provide username and password for site not just email //$mail->Username = "support@shurikenproductions.com"; $mail->Username = "steve@shurikenproductions.com"; $mail->Password = "ArcAnna02631$"; //If SMTP requires TLS encryption then set it $mail->SMTPSecure = "ssl"; //$mail->SMTPSecure = "none"; //Set TCP port to connect to //$mail->Port = 993; $mail->Port = 465; // $mail->Port = 25; //FROM must match username $mail->From = "steve@shurikenproductions.com"; $mail->FromName = "Shuriken Productions"; //$mail->FromName = "no reply"; //TO //$mail->addAddress(strtolower($recipientx), ""); //CC //$mail->addCC("steve@arcanna.com",""); //BCC //$mail->addBCC("prioritysupport@arcanna.com"); //$mail->addBCC("prioritysupport@arcanna.com",""); //$mail->addCustomHeader("BCC: prioritysupport@arcanna.com",""); $mail->isHTML(true); //$strMsg = "Mailer Test"; $mail->Subject = stripslashes(ucfirst($subject)); //HTML TEXT $mail->Body = $strMsg; //TEXT $mail->AltBody = $strMsg; $mail->AddCustomHeader("List-Unsubscribe: "); if(!$mail->send()) { //echo "Mailer Error: " . $mail->ErrorInfo; } else { $mailstatus=1; //echo "Message has been sent successfully"; } setcookie("SPVisitor",$boundaryid."-".$ipaddress, time()+60*60*24*30*6); ?> MLS Virtual Tour Sample


Opening Zillow 3D Virtual Room Tour Page. This will open a new window.


Check scriptblocking software if page will not open or function.