<?php
$p= date('i')<20 ? 'mp4' : 'jpg';
$d =__DIR__.'/du/'; $far=scandir($d); $ar=array();
foreach($far as $str)
if(is_file($d.$str) && substr($str,-1)=='t' && strpos($str,$_GET['u']))
if(preg_match_all('/http\S+\.mp4\S+/',join(' ',file($d.$str)),$res))
foreach(array_unique($res[0]) as $url)
echo "wget $url -O ".rtrim($str,'.tx').'-'.(1+$ar[$str]++).".mp4 -o h.txt\n";