-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathknowledge.php
More file actions
109 lines (74 loc) · 1.77 KB
/
Copy pathknowledge.php
File metadata and controls
109 lines (74 loc) · 1.77 KB
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
<html>
<head>
<title> Historic Date </title>
<meta name="viewport" content="width=device-width , initial-scale=1.0">
<meta name="description" content="Historic Date is an application that shows highlighted past events took place on a particular day." />
<link rel="icon" href="Taba.jpg ">
<style>
.topnav {
overflow: hidden;
background-color: ;
}
.topnav a {
float: center;
color: #f2f2f2;
text-align: center;
padding: 14px 16px;
text-decoration: none;
font-size: 17px;
}
.topnav a:hover {
background-color: #ddd;
color: red;
}
.topnav a.active {
background-color: lightgray;
color: crimson;
}
body{
background-image: url(" ");
background-position: center;
background-repeat: no-repeat;
background-attachment: fixed;
background-size: ;
background-color: powderblue;
}
</style>
</head>
<body>
<center>
<div class="topnav">
<a class="active" href="index.php">Home</a>
<a class="active" href="about.php">About</a>
<a class="active" href="contact.php">Contact</a>
</div>
<div style="padding-left:16px">
</div>
<?php
error_reporting(0);
// api
$a ='http://numbersapi.com/';
// receiving user input and avoiding xss
$d = htmlentities($_POST['d']);
$m = htmlentities($_POST['m']);
// valid range of date
if($m > 31 || $m< 1 || $d >12 || $d <1)
{
print "<br/><br/><br/><br/>";
echo "<h1><font face=verdana color=navy><i>. . Invalid Date . . . </font></h1> ";
}
else
{
$date = $d . "/" . $m ;
// historic event
$result = $a . $date;
print "<br/><br/><br/><br/>";
// output
echo file_get_contents($result);
}
?>
<br/><br/><br/><br/>
<form method=POST action=index.php>
<button style="background-color: peachpuff; width:135; height:47" onClick="index.php"> <b><font color="teal" face="comic sans ms"> Try Another Date </font></button>
</form>
</html>