forked from sudharshankr/Cybertronian-Hunt-Anokha15
-
Notifications
You must be signed in to change notification settings - Fork 0
/
success.php
58 lines (54 loc) · 1.46 KB
/
success.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<?php
function keymaker($id)
{
$secretkey='hfaa1h1awhqa3sdoyasw7e2sho3mqeojemdw09jdsklafjp1qwoijedmp03w9eiojdma';
$key=md5($id.$secretkey);
return $key;
}
$testurlkey = keymaker($_GET['id']);
if(isset($_GET['id']) && $testurlkey==$_GET['key'])
{
$dir = 'img/answer_right/';
$images= scandir($dir);
$i = rand(2,sizeof($images)-1);
$img = 'img/answer_right/'.$images[$i];
}
else
{
header('Location: homepage.php');
}
?>
<head>
<link rel="icon" href="img/anokha-logo.ico" type="image/x-icon">
<style>
.question{
top: 100px;
position: relative;
}
.btn{
height:40px;
background:#2f4f4f;
opacity:0.5;
color:white;
border-style:solid;
border-radius: 5px;
}
body{background:url('img/cosmos.jpg');}
</style>
</head>
<body>
<div class='question' align='center'>
<form action='homepage.php' method='POST'>
<img src="<?php echo $img; ?>" style='width:450px;height:450px'>
<br><br><br>
<input class='btn' type='submit' value='Go ahead'/>
</div>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-57855581-1', 'auto');
ga('send', 'pageview');
</script>
</body>