Location: PHPKode > scripts > AmaroK Web Frontend > obsidianmusic-2.3.0/pages/random.php
<?php

//
//  ObsidianMusic
//   a.k.a. amaroK Web Frontend 2.0
//
//  Created 1/3/06
//   Copyright (C) Ryan Loebs (ObsidianX) 2005/2006
//   See LICENSE for GPL
//
//  random.php - Randomly chooses a song to give to the user
//
///////////////////////////////////////

if(eregi("random.php", $_SERVER['PHP_SELF'])){
	die("Cannot access directly.");
}

$site = "http://" . $_SERVER['SERVER_NAME'] . substr($_SERVER['PHP_SELF'], 0, (strlen($_SERVER['PHP_SELF'])-strlen("random.php")));


$q = query(getquery('random_song'));
$res = fetch_assoc($q);

die(header("Location: $site/?action=play&sid={$res['id']}"));

Return current item: AmaroK Web Frontend