<?php

$action = (isset($_GET['a'])) ? $_GET['a'] : "";

$videos = array(
	array("Sample Video 1", "color.flv", 0),
	array("Sample Video 2", "color.flv", 0),
	array("Sample Video 3", "color.flv", 0),
	array("Sample Video 4", "color.flv", 0),
	array("Sample Video 5", "color.flv", 0),
	array("Sample Video 6", "color.flv", 0)
);

if($action == "getvideos")
{
	$xml = "<videos>";
	for($i=0; $i < count($videos); $i++)
	{
		$xml .= "\t<video";
		$xml .= " name=\"" . $videos[$i][0] . "\""; 
		$xml .= " src=\"" . $videos[$i][1] . "\"";
		$xml .= " playCount=\"" . $videos[$i][2] . "\""; 
		$xml .= " />\n";	
	}
	$xml .= "</videos>";
	
	header("Content-type: text/xml");
	print $xml;
}

?>