Formatting code for CkFortune110


show source only

======Fortune with 10% chance of displaying======

====Requirements====

~-php5-cli
~-fortune-mod

====Skrypt====

%%(php;1;ckfortune1-10.php)
#!/usr/bin/php -q

<?php

/*
CkFortune1-10 - displays fortunes with 10% chance of appearing
Copyright (C) 2010 Ɓukasz "Cyber Killer" Korpalski

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

//runs the fortune program with 10% probability as not to lower admin productivity by reading too many fortunes ;-)
//append to ~/.bashrc

if(rand(1,10)==1)
{
system("fortune -a");
echo("\n");
}

?>
%%

----::c::
CategoryProjekty
Valid XHTML 1.0 Transitional :: Valid CSS :: Powered by WikkaWiki