$t1 = explode("|", $videos[$i]); $tip = $t1[0]; $r = $t1[1]; if ($tip == "22") { break; } if ($tip == "18") { break; } } } return $r; } $l = $_GET["file"]; $l = urldecode($l); $l = str_prep($l); $html = file_get_contents($l); if (preg_match_all("/(http\\b.*?)(\"|\\')+/i", $html, $matches)) { $links = $matches[1]; } $s = "/youtube\\.c|videa\\.hu\\/flvplayer|kiwi\\.kz/i"; for ($i = 0; $i < count($links); $i++) { $cur_link = $links[$i]; if (preg_match($s, $cur_link)) { if (strpos($cur_link, 'youtube') !== false) { $link = youtube($cur_link); } elseif (strpos($cur_link, 'kiwi.kz') !== false) { $file = get_headers($cur_link); foreach ($file as $key => $value) { if (strstr($value, "Location")) { $link = urldecode(ltrim($value, "Location:"));
foreach ($file as $key => $value) { if (strstr($value, "location")) { $url = ltrim($value, "location: "); $id = substr(strrchr($url, '='), 1); } // end if } // end foreach } elseif (preg_match('/(d=)([A-Za-z0-9_]+)/', $string, $m)) { $h = file_get_contents($string); $id = str_between($h, 'flashvars.v = "', '"'); } return $id; } //***************Here we start************************************** $filelink = str_prep($filelink); if (strpos($filelink, "vidxden") !== false || strpos($filelink, "divxden") !== false) { if (strpos($filelink, "embed") === false) { $t = explode("/", $filelink); $id = $t[3]; $filelink = $t[0] . "/" . $t[1] . "/" . $t[2] . "/" . "embed-" . $id . "-width-653-height-362.html"; } $h = file_get_contents($filelink); $link = get_unpack(1, 11, 5, $h); } elseif (strpos($filelink, "vidbux") !== false) { if (strpos($filelink, "embed") === false) { $t = explode("/", $filelink); $id = $t[3]; $filelink = $t[0] . "/" . $t[1] . "/" . $t[2] . "/" . "embed-" . $id . "-width-653-height-362.html"; } $h = file_get_contents($filelink);
function str_between($string, $start, $end) { $string = " " . $string; $ini = strpos($string, $start); if ($ini == 0) { return ""; } $ini += strlen($start); $len = strpos($string, $end, $ini) - $ini; return substr($string, $ini, $len); } function str_prep($string) { $string = str_replace(' ', '%20', $string); $string = str_replace('[', '%5B', $string); $string = str_replace(']', '%5D', $string); $string = str_replace('%3A', ':', $string); $string = str_replace('%2F', '/', $string); $string = str_replace('#038;', '', $string); $string = str_replace('&', '&', $string); return $string; } $link = $_GET["file"]; $link = urldecode($link); $link = str_prep($link); $html = file_get_contents($link); $t1 = explode('name="FileName"', $html); $t2 = explode('value="', $t1[1]); $t3 = explode('"', $t2[1]); $link = "http://127.0.0.1/cgi-bin/translate?stream,," . $t3[0]; print $link;