| Name | Modified | Size | Downloads / Week |
|---|---|---|---|
| license.txt | 2010-11-08 | 1.1 kB | |
| readme.txt | 2010-11-08 | 1.5 kB | |
| fortune_php.zip | 2010-11-08 | 927.6 kB | |
| Totals: 3 Items | 930.2 kB | 0 |
-----------------------------------------------------------------
fortune_php:
PHP version of the famous Unix tool "fortune" which generates random
"fortune cookies". This is famous in US but other countries may not be
familiar with it: it is a paper with a proverb or quote hidden inside
a cookie served at the end of a meal in chinese restaurants (in France
we had something similar with wafers and also in chocolate sweets
called "papillotes")
Author : Michel Kern
Date : 4th nov 2010
License : Freeware + Open Source (MIT license, see license.txt)
Copyright : 2010 Michel Kern (http://www.terimakasi.com)
-----------------------------------------------------------------
Quick start guide:
1. Upload fortune_php in the chosen directory (let's call it FORTUNE_HOME)
2. Use the following snippet:
require_once "FORTUNE_HOME/fortune.php";
$cookie = get_cookie("FORTUNE_HOME");
To add your own quote files (or remove/edit those provided):
1. add/remove quote files in "FORTUNE_HOME/dat" subdirectory:
each quote file is a text file without extension, in its content
each quote must end with a "%", eg:
my first quote
....
%
my second quote
....
2. run "FORTUNE_HOME/create_fortunes_index.php":
This tool creates ".idx" files for each quote file and finally
"fortune.cat" (all these files are create in "FORTUNE_HOME/dat"),
theses files are required by "fortune.php"