X-Bender-like random headers ;)

Do something cool with CMS? Show us ...
This board is for 'Answers', and the discussion of answers... Not for questions.
Post Reply
User avatar
kermit
Power Poster
Power Poster
Posts: 693
Joined: Thu Jan 26, 2006 11:46 am

X-Bender-like random headers ;)

Post by kermit »

absolutely, completely serves no purpose except to make a statement to the < 0.01% of people that'll actually examine your response headers... 

;D


insert right before echo $html; in index.php

Code: Select all

// random x-bender-like headers by kermit
$x_bender[] = "Slashdot rulz, digg droolz.";
$x_bender[] = "Blondes do have more fun, but redheads make sure YOU have more fun!";
$x_bender[] = "Sometimes life is like a box of chocolates, melting in the sun.";
$x_bender[] = "Wishy for President!";
$x_bender[] = "Miller.. Wisconsin swampwater.. in a can!";
$x_bender[] = "Fix Windows, install Ubuntu!"; 
// to add more items, simply follow the same format as above
srand((float) microtime() * 10000000); // supposedly can be omitted php 4.2 and up
$x_bender_random_pick = array_rand($x_bender, 1);
// prefix header entry with X- as shown below...
header("X-The-Truth: ".$x_bender[$x_bender_random_pick]);
word of caution... be very careful mukking around with headers.

inspired by slashdot's x-bender headers (visit their site with firefox's livehttpheaders extension).
Attachments
cmsms-random-headers.gif
Last edited by kermit on Mon Jul 07, 2008 6:14 am, edited 1 time in total.
eternity (n); 1. infinite time, 2. a seemingly long or endless time, 3. the length of time it takes a frozen pizza to cook when you're starving.
4,930,000,000 (n); 1. a very large number, 2. the approximate world population in 1986 when Microsoft Corp issued its IPO. 3. Microsoft's net profit (USD) for the quarter (3 months) ending 31 March 2007.
CMSMS migration and setup services | Hosting with CMSMS installed and ready to go | PM me for Info
Post Reply

Return to “Tips and Tricks”