MyBB Community Forums

Full Version: display random quotes in my signature from a php file
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have a simple php script that rotates random quotes I entered into the file upon the page being refreshed. how do I get them to show up in the signature?

all I should need to do is enter [img]link to php file[/img], correct?

here's the script, in case it needs modifications to get it to work:

<?php
$quotes = array (
'"Everything the State says is a lie, and everything it has it has stolen." - Frederich Nietzsche',
'"Government is the great fiction, through which everybody endeavors to live at the expense of everybody else." - Frederic Bastiat',
'"When goods don’t cross borders, soldiers will." - Fredric Bastiat',
'"It is easy to be conspicuously "compassionate" if others are being forced to pay the cost." - Murray N. Rothbard',
'"Underlying most arguments against the free market is a lack of belief in freedom itself." - Milton Friedman',
'"There comes a time when a moral man can’t obey a law which his conscience tells him is unjust." - Martin Luther King, Jr.',
'"You can’t conquer a free man; the most you can do is kill him." - Robert A Heinlein',
'"The worship of the state is the worship of force. There is no more dangerous menace to civilization than a government of incompetent, corrupt, or vile men. The worst evils which mankind ever had to endure were inflicted by governments." - Ludwig von Mises',
);

// pick a random number
$num = rand(0, count($quotes) - 1);

// display the elements we chose randomly
echo ( $quotes[$num] );
?>
You'll have to make use of GD to make the response be of an image type: http://www.nyphp.org/resources/gd-Librar...lation.pdf
(2012-09-21, 09:20 PM)euantor Wrote: [ -> ]You'll have to make use of GD to make the response be of an image type: http://www.nyphp.org/resources/gd-Librar...lation.pdf

sent you a PM about something.