Follow us on Twitter!
The measure of a mans life is not how well he dies, but how well he lives.
Wednesday, April 16, 2014
Navigation
Home
HellBoundHackers Main:
HellBoundHackers Find:
HellBoundHackers Information:
Learn
Communicate
Submit
Shop
Challenges
HellBoundHackers Exploit:
HellBoundHackers Programming:
HellBoundHackers Think:
HellBoundHackers Track:
HellBoundHackers Patch:
HellBoundHackers Other:
HellBoundHackers Need Help?
Other
Members Online
Total Online: 23
Guests Online: 16
Members Online: 7

Registered Members: 82813
Newest Member: VesuviusSentinel
Latest Articles
View Thread

HellBound Hackers | HellBound Hackers | Questions

Author

The saying that changes under the logo


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
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


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 28-12-09 17:48
random number generator + array full of sayings.

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


Author

RE: The saying that changes under the logo


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
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.


Author

RE: The saying that changes under the logo


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
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

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.




Edited by on 28-12-09 18:20