Home
Name Modified Size InfoDownloads / Week
fortune_php_neo.zip 2016-11-23 969.2 kB
readme.txt 2016-11-23 1.7 kB
license.txt 2016-11-23 1.2 kB
Totals: 3 Items   972.1 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").

Extensively refactored (along with bug fixes) by Thomas Leavitt in 2016.

Initial Author : Michel Kern 
Date      : 4th Nov., 2010
License   : Freeware + Open Source (MIT license, see license.txt) 
Copyright : 2010 Michel Kern (http://www.terimakasi.com)
Date: 23rd Nov., 2016
Refactoring Author: Thomas Leavitt 
Refactoring Copyright: 2016 Thomas Leavitt (thomas@thomasleavitt.org)
-----------------------------------------------------------------

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"
Source: readme.txt, updated 2016-11-23