Listo, problema resolvido.
Código PHP:
<?
$archivo ="contador.txt";
$abre = fopen($archivo, "a+");
$total = fread($abre, filesize($archivo));
$code = $total;
fclose($abre);
$abre = fopen($archivo, "w");
$totala = $total + 1;
$grabar = fwrite($abre, $totala);
fclose($abre);
$titul = $_POST['titu'];
$descripcio = $_POST['des'];
$lin = $_POST['lin'];
$shtml="<?
\$titulo = '$titul';
\$descripcion = '$descripcio';
\$link = '$lin ';
\$numero = $code;
?>";
$sfile="videos/$code.php";
$fp=@fopen($sfile,"a+");
$result = fwrite($fp,$shtml);
fclose($fp);
echo "El video fue colocado correctamente.";
?>