summaryrefslogtreecommitdiff
path: root/app.php
blob: db70e33904348b1f3277021383614f3e4f1f9735 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
<!DOCTYPE html>
<html>
<head>
  <title>Status</title>
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">
  <style type="text/css">
  html {
    font-size: 25px;
  }
  a {
  text-decoration: none;
  color: #ffffff;
  }
  .bloc{
    background-color: #959595;
    margin-top: 10px;
    margin-bottom: 10px;
  }
  #code200{
    background:#679403;
    border-radius:15%;
    height:25px;
    border:2px solid #679403;
    float: left;
    margin-right: 5px;
  }
  #code404{
    background:#d7c90e;
    border-radius:15%;
    height:25px;
    border:2px solid #d7c90e;
    float: left;
    margin-right: 5px;
  }
  #code401{
    background:#d7570e;
    border-radius:15%;
    height:25px;
    border:2px solid #d7570e;
    float: left;
    margin-right: 5px;
  }
  #code501{
    background:#d7570e;
    border-radius:15%;
    height:25px;
    border:2px solid #d7570e;
    float: left;
    margin-right: 5px;
  }
  #down{
    background:#d70e0e;
    border-radius:15%;
    height:25px;
    border:2px solid #d70e0e;
    float: left;
    margin-right: 5px;
  }
  .refresh_c{
    margin-left: auto;
    margin-right: auto;
    width: 10%;
    height: 10%;
    text-align: center;
    background-color: #da5907;
    background-color:#44c767;
	-moz-border-radius:28px;
	-webkit-border-radius:28px;
	border-radius:28px;
	border:1px solid #18ab29;

	cursor:pointer;
	color:#ffffff;
	font-family:Arial;
	font-size:17px;
	padding:16px 31px;
	text-decoration:none;
	text-shadow:0px 1px 0px #2f6627;
  }
  .refresh_c:hover {
    background-color:#5cbf2a;
  }
  .refresh_c:active {
    position:relative;
	top:5px;
  }
  </style>
</head>
<body>
<?php
    $listurl = array("neodarz.ovh","gogs.neodarz.ovh","kb.neodarz.ovh","cal.neodarz.ovh","dl.neodarz.ovh","duniter.neodarz.ovh","flux.neodarz.ovh","git.neodarz.ovh","guik.neodarz.ovh","maltrail.neodarz.ovh","music.neodarz.ovh","pad.neodarz.ovh","plex.neodarz.ovh","radicale.neodarz.ovh","rmail.neodarz.ovh","sync.neodarz.ovh","vpn.neodarz.ovh","www.neodarz.ovh");

    foreach ($listurl as $url) {
      $ch = curl_init($url);
      curl_setopt($ch, CURLOPT_NOBODY, true);
      curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
      curl_exec($ch);
      $retcode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
      curl_close($ch);
      if (200==$retcode) {
          echo "<div class='bloc code200'><div id='code200'>UP</div> ".$retcode." <a href='https://".$url."'>".$url."</a></div>";
      } elseif (404==$retcode) {
        echo "<div class='bloc code404'><div id='code404'>UP</div> ".$retcode." <a href='https://".$url."'>".$url."</a></div>";
      } elseif (401==$retcode) {
        echo "<div class='bloc code401'><div id='code401'>UP</div> ".$retcode." <a href='https://".$url."'>".$url."</a></div>";
      } elseif (501==$retcode) {
        echo "<div class='bloc code501'><div id='code501'>UP</div> ".$retcode." <a href='https://".$url."'>".$url."</a></div>";
      } else {
        echo "<div class='bloc down'><div id='down'>DOWN</div> ".$retcode." <a href='https://".$url."'>".$url."</a></div>";
      }
    }
?>
<a href="http://neodarz.ovh/web/app.php"><div class="refresh_c">
<i class="fa fa-refresh fa-5x" aria-hidden="true"></i>
</div></a>
</body>
</html>