-
Notifications
You must be signed in to change notification settings - Fork 3
/
index.php
72 lines (46 loc) · 2.29 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
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
<?php
if(strlen(strstr($_SERVER['HTTP_USER_AGENT'],"curl")) <= 0 ){ // if not a curl request
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<?php
$f_contents = file("nicknames.txt");
$line = $f_contents[rand(0, count($f_contents) - 1)];
$line = preg_replace( "/\r|\n/", "", $line);
?>
<title>Is it Mat “<?php echo $line ?>” Marquis’ birthday?</title>
<link rel="stylesheet" href="css/yesitismatsbirthday.css" />
</head>
<body>
<h1>Yes!</h1>
<aside>
<p class="greeting">You should wish <a href="http://twitter.com/wilto">@wilto</a> a happy birthday!</p>
<p>Add <a href="mat.ics">Mat “<?php echo $line ?>” Marquis’ birthday</a> to your calendar!</p>
<p>Mat’s <a href="http://www.amazon.com/registry/giftlist/3ELRFFQC2AOD6/ref=cm_sw_r_tw_gln">Amazon Wish List</a>!</p>
<p>Follow <a href="https://twitter.com/matsbirthday">@matsbirthday</a> to be kept up to date!</p>
<p><b>New!</b> Use our new <acronym title="Birthday as a Service">BaaS</acronym> API: <code>curl isitmatsbirthday.com</code></p>
<p class="heads">
<img class="head" src="heads/head1.png" alt="Yo Bro" />
<img class="head" src="heads/head2.png" alt="Broseph Brosephson" />
<img class="head" src="heads/head3.png" alt="Bro Diddley" />
</p>
</aside>
<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-11757054-2', 'isitmatsbirthday.com');
ga('send', 'pageview');
</script>
<a href="https://github.com/alistapart/isitmatsbirthday"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://camo.githubusercontent.com/365986a132ccd6a44c23a9169022c0b5c890c387/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f7265645f6161303030302e706e67" alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png"></a>
</body>
</html>
<?php } else {
set_time_limit(0);
sleep(1); ?>
Yes.
<?php } ?>