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
9385 views, 6715 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.

386b in size
last modified May 6, 2006 at 9:55pm
6135 views, 5533 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.

Shopping at the mall
{OPPOSITESEX} and I went shopping at the mall today in {PLACE}.  We got {NUMBER} bargains!  We bought {NOUN} to repair that leaky roof and {NOUN-PLURAL} as a present for my mom.  We also got some {ADJECTIVE} {NOUN-PLURAL} for the car.  When {OPPOSITESEX} saw what I bought at Victoria's Secret they said, "{FUNNY}!"  I was very {EMOTION} about that.  That's ok, though.  Once I saw the {NOUN} they bought for their {ROOM} I couldn't stop laughing. Especially since they paid ${NUMBER} for it! We ended up eating {FOOD} in the food court before we came home.
578b in size
last modified May 6, 2006 at 9:55pm
5435 views, 5285 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
5505 downloads

test.madlibs.php

An example use of the madlibs class.

924b in size
last modified May 6, 2006 at 9:55pm
6469 views, 5673 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 :: 39382 views

© Andrew Collington, 2002-2007.