Simple PHP Random Image

•December 25, 2007 • Leave a Comment

Simple way to mix elements of an array made with glob() & shuffle() functions:

<?php
function randomize() {
$pics = glob("*.jpg");
shuffle($pics);
return $pics[0];
}
echo '<img src="/images/' . randomize() . '.jpg" alt="" />';
?>

In this case the elements are JPEG files.

VLC cli player

•December 25, 2007 • 1 Comment

You can run this command from the terminal:

vlc -I ncurses lista.m3u

This way you can use it also to see video files and dvd.

Simple phpinfo()

•December 25, 2007 • Leave a Comment

PHP allows you to grub information from the server with simple functions as phpinfo():

<?php
   phpinfo();
?>