Compare commits
3 Commits
Author | SHA1 | Date |
---|---|---|
Alie | b981c65d76 | |
Alie | 8bf2411455 | |
Alie | 20b422961b |
|
@ -1,33 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Is <?php echo $_SERVER['QUERY_STRING'] ?> online?</title>
|
||||
<link href="style.css" rel="stylesheet">
|
||||
<link href="icon.png" rel="icon">
|
||||
</head>
|
||||
<body id="about">
|
||||
<div class="centercubeplease">
|
||||
<h1>Is <?php echo $_SERVER['QUERY_STRING'] ?> online?</h1>
|
||||
<h2><?php function checkOnline($domain) {
|
||||
$curlInit = curl_init($domain);
|
||||
curl_setopt($curlInit,CURLOPT_CONNECTTIMEOUT,10);
|
||||
curl_setopt($curlInit,CURLOPT_HEADER,true);
|
||||
curl_setopt($curlInit,CURLOPT_NOBODY,true);
|
||||
curl_setopt($curlInit,CURLOPT_RETURNTRANSFER,true);
|
||||
|
||||
//get answer
|
||||
$response = curl_exec($curlInit);
|
||||
|
||||
curl_close($curlInit);
|
||||
if ($response) return true;
|
||||
return false;
|
||||
}
|
||||
if(checkOnline('http://'.$_SERVER['QUERY_STRING'])) {echo "yes"; }
|
||||
elseif(gethostbyname($_SERVER['QUERY_STRING']) == $_SERVER['QUERY_STRING']) {echo "That does not exist dummy";}
|
||||
else{echo "no";}
|
||||
?></h2>
|
||||
<p>Disclamer, this only checks if an http server is reacheable!</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -29,7 +29,7 @@ with open("/home/django/secret_key.txt") as f:
|
|||
# SECURITY WARNING: don't run with debug turned on in production!
|
||||
DEBUG = True
|
||||
|
||||
ALLOWED_HOSTS = ["yari.fai.st", "127.0.0.1"]
|
||||
ALLOWED_HOSTS = ["*"]
|
||||
CSRF_COOKIE_SECURE = True
|
||||
SESSION_COOKIE_SECURE = True
|
||||
# Application definition
|
||||
|
|
Loading…
Reference in New Issue