For all those who spin articles or posts (eg with bestspinner), here is a class of mine I use in autoblogs to reuse my content often:
http://www.automated-marketing-system.com/madlib/madlib.php.zip
Example for usage:
AWARE ADULT CONTENT:
General text (left side, bottom) is spinned, girls description is from csv.
Discover Axelle Parker: Golden eyes @VirtualGirl2HD.com
Watch Aria Giovanni: Vampire killer @VirtualGirl2HD.com
...
(for wf members use only, please don't contribute)
Usage:
$outputstring = Madlib::spin(string $text [, string $salt] [,mixed $keys])
Description:
This library can be used to spin text containing madlibs (like '{one|{two|2|a pair}|three}') by selecting words thru random, a optional salt (for example a url or domain) and prefered keywords (optional).
Installation:
Just copy and extract this file into your webspace and include it at the top of your php-files:
PHP:
<?php include_once('MadlibSpinner.php'); ?>
Parameters:
string $text The text that should be spinned, nested spintax/madlibs are possible
string $salt [optional] If given, the text would be spinned every time the same way. If not, text will be spinned by random each time. Good for autosites, when the url is the salt, the page would always be the same.
mixed $keys [optional] Can be a string with one keyword, a madlib with keywords separeted by '|' or an array with several keywords. If given keywords will be prefered.
Return Values:
Returns the spun text, with madlibs replaced
Examples:
PHP:
echo Madlib::spin("{two|four} eggs");
Will output "two eggs" or "four eggs"
PHP:
echo Madlib::spin("{two|four} eggs","www.domain.tld/mypage.php");
Will ouput every time: "four eggs" cause of the given salt
PHP:
echo Madlib::spin("{two|four} eggs","www.domain.tld/mypage.php","two");
Will ouput every time: "two eggs" cause of the given keyword
PHP:
echo Madlib::spin("{two|four} eggs","www.domain.tld/mypage.php","one|two|three");
Will ouput every time: "two eggs" cause of 'two' is included in the given keyword madlib
PHP:
echo Madlib::spin("{two|three|four} eggs","",array("one","two","three"));
Will ouput: "two eggs" or "three eggs" randomly cause no salt is given and "two" and "three" are in the keys array