Snippet or module for random oneliner on page

can somebody help me solve the problem.

//:Create a random oneliner on your page
//:Use: [[OneLiner]]. The file with the oneliner data is located in /modules/droplets/example/oneliners.txt
$line = file (dirname(__FILE__)."/example/oneliners.txt");
return $line[0];

with this snippet i was able to display sentences out of the oneliner.txt file
random one sentence a time

is there a Drupal Modul oder a code snippet for this.

thanks for any tipp

Drupal version: