Secret Word and Secret Web Page Script

  Post new topicReply to topicPrintable Version
<< View previous topic View next topic >>
Share: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
#1   Secret Word and Secret Web Page Script
Dauthus
CZ Addict
 Codezwiz Site Donator
Dauthus has been a member for over 20 year's 20 Year Member
usa.gif illinois.gif
Age: 61
Gender: Male
Website:
Status: Offline
Joined: Mar 17, 2004
0.06 posts per day
Posts: 426
Points: 15,917
   
Here's a script I found and modified to work with PHPNuke. I thought it was kind of fun to play with. I don't know who wrote it originally, and if you do, please give them the proper credit.

This script lets you type a word, and your browser is redirected to a website of your choosing. You can change the word any time you want, and you can also change the link the browser points to. It is pretty fun to play with. In this example you would type out the word "javascript" on your keyboard (without the quotes) when the page completes loading. When you hit the last letter (t), your web browser will automatically redirect to the page you chose in the script.


#
#-----[ OPEN ]------------------------------------------
#
#

includes/javascript.php

#
#-----[ FIND ]------------------------------------------
#
#  AT THE BOTTOM OF THE PAGE

?>

#
#-----[ BEFORE, ADD ]------------------------------------------
#

echo "<S  CRIPT LANGUAGE=\"JavaScript\">\n";
echo "<!-- Begin\n";
echo "var SpecialWord = \"javascript\",\n";
echo "    SpecialUrl = \"http://codezwiz.com\",\n";
echo "    SpecialLetter = 0;\n";
echo "function getKey(keyStroke) {\n";
echo "var isNetscape=(document.layers);\n";
echo "// Cross-browser key capture routine couresty\n";
echo "// of Randy Bennett (rbennett@thezone.net)\n";
echo "var eventChooser = (isNetscape) ? keyStroke.which : event.keyCode;\n";
echo "var which = String.fromCharCode(eventChooser).toLowerCase();\n";
echo "if (which == SpecialWord.charAt(SpecialLetter)) {\n";
echo "SpecialLetter++;\n";
echo "if (SpecialLetter == SpecialWord.length) window.location = SpecialUrl;\n";
echo "}\n";
echo "else SpecialLetter = 0;\n";
echo "}\n";
echo "document.onkeypress = getKey;\n";
echo "//  End -->\n";
echo "</s  cript>\n\n";

#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
#EoM


**Remove the spaces from between the s and c in the words script.

Change SpecialWord to what you want it to be. In this case javascript.

Change SpecialURL to waht you want it to be. In this case [ Register or login to view links on this board. ]



_________________
[ Register or login to view links on this board.]
Vivere disce, cogita mori
Back to top Reply with quote
#2   re: Secret Word and Secret Web Page Script
Taut
PayPal Donation
CZ Revered Member
 Codezwiz Site Donator
usa.gif california.gif
Occupation: Entrepreneur
Gender: Female
Fav. Sports Team: SF Giants
Status: Offline
Joined: May 27, 2003
0.70 posts per day
Posts: 5530
Points: 481,695
   
thank you...I'll add it to my site a lil later since all of my members are word junkies lol



Back to top Reply with quote
Display posts from previous:      
Add To: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
<< View previous topic View next topic >>
Post new topicReply to topic

Jump to 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum