Tutorials: PHP: Random Quotes
You'll notice that a few of my skins have random scripts on the main page. There are a lot of complicated quotes scripts out there, so I'm going to simplify it for you and give you the script I use. It consists of two files and it doesn't require a database. The only requirement is that your server must allow php. Alright, let's get started then.
Open up Notepad and paste the following code into it:
Save the file as quotes.php. Go back to Notepad and open up a new file. In this file, start putting in the quotes you want to use. Begin and end each quote with " "s. Make sure that you DO NOT double-space. If you do, blank quotes will show up. When you're finished, saved the file as quotes.txt. Upload these to your site. The way the quotes are displayed will depend on what you use to blog with and the coding involved in that blog software. I use Moveable Type and I find it easier to go into my templates, create a new template called quotes.php, add the php script, then rebuild. Then I add the following code where I want the quotes to show up:
If you're hand-coding your site (good for you btw!), just add the following code where you want the quotes to be displayed:
I hope you enjoy this script. Like I said, once you have the files uploaded, the blog software you use will determine what coding you use to make it show up on your site.