/*
Plugin Name: random_anekdot
Plugin URI: http://blog.portal.kharkov.ua/
Author: Yuri 'Bela' Belotitski
Version: 1.0
Author URI: http://www.portal.khakrov.ua/
*/
function random_anekdot() {
$file = dirname(__FILE__) . '/text.txt';
$text = join(' ',file($file));
$text = preg_split("/\r?\n\s\r?\n/s",$text);
srand ((double) microtime() * 10000000);
echo $text[array_rand ($text)];
}