<?php
// Made by Robin
$url = "http://cache.googlevideo.com/get_video?video_id=";
$url2 = "";
$max = "11";

if ($_POST['id']){

	$id = $_POST['id'];
	$char = strlen($id);
	
	if (preg_match('/[^a-z0-9-]/i', $id)) {
		echo "Alleen letter en cijfers zijn toegenstaan, probeer het nog een keer.";
		exit;
	} else {
	
		if ($char != $max){
		
			if ($char > $max){
				$som = $max - $char;
				echo "De code die u heeft ingevoerd is " . $som . " characters te lang.";
				exit;
			}
			
			if ($char < $max){
				$som = $max - $char;
				echo "De code die u heeft ingevoerd is " . $som . " characters te kort.";
				exit;
			}
		}
	}
	
	$link = $url . $id . $url2;
	echo "<a href='" . $link . "'>Download: flv</a>";
	
} else {
Echo "Formulier:";
echo'
<form action=\"Untitled-2.php\" method=\"post\">
<input name=\"id\" type=\"text\" size=\"20\" maxlength=\"11\">
<input name=\"\" type=\"submit\" value=\"Submit\">
</form>';
}
?>

