Пример #1
0
<?php

require_once "framework2/Walkntrade.php";
$wt = new Walkntrade();
$serverName = basename($_SERVER["SERVER_NAME"]);
$serverURI = $_SERVER['REQUEST_URI'];
$redirect = true;
foreach ($wt->getValidDomains() as $domain) {
    if ($serverName === $domain) {
        $redirect = false;
    }
}
if ($redirect) {
    header('Location: https://walkntrade.com' . $serverURI, true, 301);
}
$query = isset($_GET["query"]) ? $_GET["query"] : "";
?>

<?php 
$userAgent = $_SERVER["HTTP_USER_AGENT"];
$mobileDevices = array("Android", "iPhone", "iPad", "Windows Phone");
foreach ($mobileDevices as $mobileDevice) {
    if (strpos($userAgent, $mobileDevice) !== false) {
        include "mobile/results.php";
        return;
    }
}
?>

<!DOCTYPE html>
<html>