<?php
$flashx = $_POST['flashx'];
function parsear($i,$f,$s) {
list($crap,$y) = explode($i,$s,2);
list($x,$shit) = explode($f,$y,2);
return $x;
}
if(preg_match('%www.flashx.tv%', $flashx,$match)) {
$fid = parsear('flashx.tv/','.html',$flashx);
$link = 'http://www.flashx.tv/embed-'.$fid.'-640x360.html';
$html = file_get_contents(''.$link.'');
$id = parsear('smil|','|sources',$html);
$ids = 'http://www.flashx.tv/'.$id.'.smil';
$html2 = file_get_contents(''.$ids.'');
$sv = parsear('meta base="rtmp://',':',$html2);
$ida = parsear('h=','"',$html2);
$id2 = parsear('logo|','|',$html);
$video = 'http://'.$sv.'/'.$ida.'/video1.mp4';
$img = parsear('<img src="','"',$html);
echo '<html><head><title>Flashx.tv reproductor personalizado. by Dieguit0sk8</title></head><body><form action="" method="post"><input name="flashx" value="http://www.flashx.tv/8k6aqw6yr1q4.html" type="text" style="width:422px"><input name="" type="submit" value="GENERAR Link"></form>Link del video: '.$video.'<br>Captura de video: '.$img.'</br></br><div class="video_player" id="video_player"><video style="margin-left: -3px;" controls="controls" preload="auto" poster="'.$img.'" src="'.$video.'" height="405" width="720"></video><br><br> Herramienta creada por Dieguit0sk8</div></body><html>';
} else {
echo '<html><head><title>Flashx.tv reproductor personalizado. by Dieguit0sk8</title></head><body><form action="" method="post"><input name="flashx" value="http://www.flashx.tv/8k6aqw6yr1q4.html" type="text" style="width:422px"><input name="" type="submit" value="GENERAR Link"></form></body><html>';
}
?>