-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
executable file
·43 lines (40 loc) · 1.14 KB
/
index.php
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
<html>
<head>
<title>Lucas's Webpage</title>
</head>
<body>
<?php
system("python counter.py");
echo("<br />");
$t=time();
echo("You are visiting my website on ");
echo(date("D F d Y", $t));
echo(" at ");
$h = date("H", $t);
echo($h);
echo(":");
echo(date("i", $t));
echo(":");
echo(date("s" ,$t));
echo("<br />");
echo("<br />");
$check = 0;
if ($h < 8) $check = 0;
else if ($h >= 16) $check = 2;
else $check = 1;
$command1 = "python morning.py \"$check\"";
$command2 = "python afternoon.py \"$check\"";
$command3 = "python evening.py \"$check\"";
echo("Number of visitors by time of day");
echo("<br />");
echo(" Morning visitors (midnight to 8am): ");
system("$command1");
echo("<br>");
echo(" Afternoon visitors (8am to 4pm): ");
system("$command2");
echo("<br />");
echo(" Evening visitors (4pm to midnight): ");
system("$command3");
?>
</body>
</html>