Join us at IRC!
The measure of a mans life is not how well he dies, but how well he lives.
Friday, May 25, 2012
Navigation
Members Online
Total Online: 28
Web Spiders: 12
Guests Online: 26
Members Online: 2

Registered Members: 70217
Newest Member: HyperFang8
Latest Articles
View Thread

HellBound Hackers | HellBound Hackers | Questions

Author

The saying that changes under the logo

Propheis
Member

Posts: 4
Location:
Joined: 03.12.09
Rank:
Newbie
Posted on 28-12-09 17:42
Hey, I'm designing a web page, and i was wondering how they got the saying under the logo to change every time you reload the page. I would like to have the same thing in my web page
Author

RE: The saying that changes under the logo

Compromise
Member

Posts: 224
Location:
Joined: 11.11.09
Rank:
Moderate
Warn Level: 30
Posted on 28-12-09 17:48
random number generator + array full of sayings.

Fill the array with a textfile btw (like fortune).


CrazySpai
minecraft.net
Author

RE: The saying that changes under the logo

define
Member

Posts: 201
Location:
Joined: 13.12.08
Rank:
Moderate
Warn Level: 1
Posted on 28-12-09 18:07
... or, if you want to really make it interesting:

Get an array of subjects, array of verbs, and array of predicates, and use those to randomly generate "quotes". Then, use the names of famous politicians of the past to attribute the "quote" for bonus humor points.


If you need to contact me, send me a PM. I will read and/or respond in time.
Author

RE: The saying that changes under the logo

wolfmankurd
Member



Posts: 1519
Location: UK
Joined: 30.05.05
Rank:
God
Posted on 28-12-09 18:09
define wrote:
... or, if you want to really make it interesting:

Get an array of subjects, array of verbs, and array of predicates, and use those to randomly generate "quotes". Then, use the names of famous politicians of the past to attribute the "quote" for bonus humor points.


To make it even better use a markov chain. Anyways, here's some code

<?PHP
$file = file_get_contents('file.txt');
$lines = explode("\n",$file);
echo $lines[mt_rand(0,count($lines)-1)]."\n";
?>


Will read lines from "file.txt" and print out a random line.


BY READING MY POST, YOU ACCEPT IT AS IS AND AGREE TO MY DISCLAIMER OF ALL WARRANTIES, EXPRESS OR IMPLIED, AS WELL AS DISCLAIMERS OF ALL LIABILITY, DIRECT, INDIRECT, CONSEQUENTIAL OR INCIDENTAL, THAT MAY ARISE FROM THE USE OF THIS (MIS)INFORMATION.




Edited by wolfmankurd on 28-12-09 18:20
Widowmakr@hotmail.com http://LetsHackStuff.com
Guest
Username

Password

Remember Me


Bookmark This Page
Affiliates
Adverts

 

 

Links
By using, viewing or obtaining any information contained on this site, you agree to the disclaimer.

© HellBound Hackers 2008- 2009. Since 3rd December 2004.