svn: /web/php/trunk/ index-sopa.php index.php
| From: | Rasmus Lerdorf | Date: | Sat, 14 Jan 2012 10:31:15 +0000 |
| Subject: | svn: /web/php/trunk/ index-sopa.php index.php | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-12811@lists.php.net to get a copy of this message | ||
rasmus Sat, 14 Jan 2012 10:31:15 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=322268
Log:
Initial SOPA blackout page
Changed paths:
A web/php/trunk/index-sopa.php
U web/php/trunk/index.php
Added: web/php/trunk/index-sopa.php
===================================================================
--- web/php/trunk/index-sopa.php (rev 0)
+++ web/php/trunk/index-sopa.php 2012-01-14 10:31:15 UTC (rev 322268)
@@ -0,0 +1,61 @@
+<?php // vim: et
+/*
+ If you're reading this, it isn't because you've found a security hole.
+ this is an open source website. read and learn!
+*/
+
+/* ------------------------------------------------------------------------- */
+
+// Get the modification date of this PHP file
+$timestamp = @getlastmod();
+
+// Note that this is not a RFC 822 date (the tz is always GMT)
+$tsstring = gmdate("D, d M Y H:i:s ", $timestamp) . "GMT";
+
+// Check if the client has the same page cached
+if (isset($_SERVER["HTTP_IF_MODIFIED_SINCE"]) &&
+ ($_SERVER["HTTP_IF_MODIFIED_SINCE"] == $tsstring)) {
+ header("HTTP/1.1 304 Not Modified");
+ exit();
+}
+// Inform the user agent what is our last modification date
+else {
+ header("Last-Modified: " . $tsstring);
+}
+?>
+<html>
+<head>
+<title>Stop SOPA/PIPA</title>
+<style>
+body {
+ background-color: #000000;
+ color:#b5b5b5;
+ font-family:'Lucida Grande', 'Lucida Sans', 'Verdana',
'sans-serif';
+ font-size:12px;
+}
+h1 {
+ text-align: center;
+ margin-top: 4em;
+ font-size:48px;
+ color:#ffffff;
+}
+p {
+ text-align: center;
+ margin-top: 2em;
+ font-size:24px;
+ color:#ffffff;
+}
+
+a:link {
+ color: #ffffff;
+ text-decoration: none;
+}
+</style>
+</head>
+<body>
+<h1>Stop <a href="http://www.opencongress.org/bill/112-h3261/show">SOPA</a>/<a
href="http://www.opencongress.org/bill/112-s968/show">PIPA</a></h1>
+<p>
+<a href="http://americancensorship.org/">For more
information (americancensorship.org)</a>
+</p>
+</body>
+</html>
Modified: web/php/trunk/index.php
===================================================================
--- web/php/trunk/index.php 2012-01-14 10:07:55 UTC (rev 322267)
+++ web/php/trunk/index.php 2012-01-14 10:31:15 UTC (rev 322268)
@@ -5,5 +5,11 @@
if (myphpnet_beta()) {
include $_SERVER['DOCUMENT_ROOT'] . '/index-beta.php';
} else {
- include $_SERVER['DOCUMENT_ROOT'] . '/index-stable.php';
+ $ts = time();
+ // Hardcode 1pm Jan.18 UTC to 1am Jan.19 UTC time window
+ if($ts>=1295355600 && $ts<1295398800) {
+ include $_SERVER['DOCUMENT_ROOT'] . '/index-sopa.php';
+ } else {
+ include $_SERVER['DOCUMENT_ROOT'] . '/index-stable.php';
+ }
}