This website is based on the upcoming changes of the elabs Rails engine. Everything's not fine, but you can see the changes coming in the next releases.

Legal stuff about this site and your private life:

  • We use a cookie to keep your preferences (language, NSFW status, login status) during navigation.
  • We use your local storage to save the announces you closed (like this one).
  • We don't save informations you don't give
  • We don't share your email address if you comment or register
  • There is no tracker of any kind.

If you're not OK with this, move your way.

An old PHP port of the Perl Cowsay program. It was made in my early dev years and it should stay there as is. I won't merge any pull requests, but you are welcome to fork and play.I don't remember of the PHP version, all I know now, is that `Function ereg

License :

The license is obviously the same as the Cowsays program.

Usage

Include inc.cowsays.php in any PHP file

Call with cowsay($string, $cowsDir, $thoughts_style='default', $eyes_style='default', $cowFile='default.php' )

Where :

  • $string= The text you want to display
  • $cowsDir = the cows dir :)
  • $thoughts_style= 'default' or 'think'; it's the way the cow expresses itself
  • $eyes_style= the eyes of the cow, may be : 'default', 'borg', 'dead', 'greedy', 'paranoid', 'stoned', 'tired', 'wired' or 'young'
  • cowFile= the cow itself. May be any PHP file in the cows dir.

The test.php file contain a form to play with the different options.

Samples :

Simple Cowsay : no options except text

/-----------------\
| Good night, s13 |
\-----------------/
        \   ^__^
         \  (oo)\_______
            (__)\       )\/\
                ||----w |
                ||     ||

Dead, thinkinkg cow:

/-----------------\
( Good night, s13 )
\-----------------/
        o   ^__^
         o  (xx)\_______
            (__)\       )\/\
             U  ||----w |
                ||     ||

Beavis :

/-----------------\
| Good night, s13 |
\-----------------/
   \         __------~~-,
    \      ,'            ,
          /               \
         /                :
        |                  '
        |                  |
        |                  |
         |   _--           |
         _| =-.     .-.   ||
         o|/o/       _.   |
         /  ~          \ |
       (____\@)  ___~    |
          |_===~~~.`    |
       _______.--~     |
       \________       |
                \      |
              __/-___-- -__
             /            _ \

The dragon and the cow

/-----------------\
| Good night, s13 |
\-----------------/
                       \                    ^    /^
                        \                  / \  // \
                         \   |\___/|      /   \//  .\
                          \  /O  O  \__  /    //  | \ \           *----*
                            /     /  \/_/    //   |  \  \          \   |
                          \@___\@`    \/_   //    |   \   \         \/\ \
                           0/0/|       \/_ //     |    \    \         \  \
                       0/0/0/0/|        \///      |     \     \       |  |
                    0/0/0/0/0/_|_ /   (  //       |      \     _\     |  /
                 0/0/0/0/0/0/`/,_ _ _/  ) ; -.    |    _ _\.-~       /   /
                             ,-}        _      *-.|.-~-.           .~    ~
            \     \__/        `/\      /                 ~-. _ .-~      /
             \____(oo)           *.   }            {                   /
             (    (--)          .----~-.\        \-`                 .~
             //__\\  \__ Ack!   ///.----..<        \             _ -~
            //    \\               ///-._ _ _ _ _ _ _{^ - - - - ~

Dead mutilated cow:

/----------------\
| Good night s13 |
\----------------/
       \   \_______
 v__v   \  \   O   )
 (xx)      ||----w |
 (__)      ||     ||  \/\
  U 

...

Leave a comment

You want to react to this content or ask something to the author? Just leave a comment here!

Note that the comments are not publicly visible, so don't worry if you don't see yours.

All the information you give will only be visible to the author. We don't share anything with anyone.

Don't fill this field if you want this form to be saved.