andy's php projects
Script and site usage:
All of the scripts on this site are provided free for non-commercial, personal or non-profit use. If you wish to use any of these in a commercial system, please refer to the payment plan.

Support:
Support for each of the scripts is given, free of charge, on the message board. Each script has its own message board which can be accessed by clicking on the 'project forum' link (beneath the description of each project).


Proudly hosted with Dreamhost

Save $20 when signing up for Dreamhost by using the promo code amnuts20


If you find these scripts useful to you, appreciate the free support, or are just an all round nice person, then why not donate a little dosh to encourage me to continue? Every little helps!

Zend Certified Engineer logo


MadLibs

This class allows you to easily add a madlibs game to your website. You can load the madlib stories in via the file system or a database. The stories are chosen at random, and a form will be shown to the user to fill in their own words. You can use a few css styles to control how things look (madlibTable, madlibTitle, madlibStory, and madlibWord).

class.madlibs.php

The main class file.

10.1kb in size
last modified Jan 13, 2009 at 3:05pm
9648 views, 6764 downloads

example-story-beach.txt

An example of a madlib story file if you use the file system instead of MySQL as your story repository area.

A trip to the beach
Yesterday, {OPPOSITESEX} and I went to the beach.  We had a really {ADJECTIVE} time!  First, we {VERB-ED} with my {NOUN}.  Then we ran down to the ocean and went {VERB-ING}.  Afterward, we barbequed some {FOOD} for lunch.  Before the sun set we had time to {VERB} on the {NOUN}.  We were really {ADJECTIVE} to come home.  We are hoping to go to the beach again soon!
386b in size
last modified May 6, 2006 at 9:55pm
6207 views, 5579 downloads

example-story-mall.txt

An example of a madlib story file if you use the file system instead of MySQL as your story repository area.

578b in size
last modified May 6, 2006 at 9:55pm
5508 views, 5341 downloads

schema.sql

An example of the table data for if you decide to use MySQL as your story repository instead of the file system.

1.23kb in size
last modified May 6, 2006 at 9:55pm
5553 downloads

test.madlibs.php

An example use of the madlibs class.

924b in size
last modified May 6, 2006 at 9:55pm
6583 views, 5720 downloads
list all projects :: this project's forum :: script in action
added Sep 3, 2003 at 6:35pm :: updated Sep 3, 2003 at 6:35pm :: 5 files :: 40246 views

© Andrew Collington, 2002-2007.