header('Location: http://' . $setting["host"] . '/offline'); exit; } require_once "functions.php"; // data variable; $domain = array(); if (isset($_GET["admin"])) { setcookie("admin", true, time() + 60 * 60 * 2, "/"); } // set cookie, ?save if (isset($_GET["save"]) && isset($_GET["d"])) { setcookie("input", $_GET["d"], time() + 60 * 60 * 24 * 365, "/"); } // destroy cookie, ?clear if (isset($_GET["clear"])) { remove_cookies(array("input", "custom")); header('Location: http://' . $setting["host"]); exit; } // set $remote_domain if (isset($_GET["d"])) { $domain["remote"] = preg_replace("/[^A-Za-z0-9-\\/\\.\\: ]/", "", trim($_GET["d"])); } else { if (isset($_COOKIE["input"])) { $domain["remote"] = preg_replace("/[^A-Za-z0-9-\\/\\.\\: ]/", "", trim($_COOKIE["input"])); } else { $domain["remote"] = null; } } $domain["cookie"] = get_cookie_array("custom"); ?>
<?php require "settings.php"; require "functions.php"; // Destroy cookie, if ?clear. if (isset($_GET["clear"])) { remove_cookies("input"); header("Location: http://" . $setting["host"], true, 303); exit; } // Set cookie, if ?save. if (isset($_GET["save"]) && isset($_GET["d"])) { set_cookie("input", $_GET["d"]); } // Set $domain["remote"]. if (isset($_GET["d"])) { $domain["remote"] = preg_replace("/[^A-Za-z0-9-\\/\\.\\: ]/", "", trim($_GET["d"])); } else { if (isset($_COOKIE["input"])) { $domain["remote"] = preg_replace("/[^A-Za-z0-9-\\/\\.\\: ]/", "", trim($_COOKIE["input"])); } else { $domain["remote"] = null; } } ?> <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Is it up?</title>