3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php /* - Tác giả: Jkey C Phong - Mong các bạn giữ nguyên phần header này! */ Class Anime47 { Private Static Function __Curl($Url) { preg_match('/http(?:s)?:\/\/(?:[\w-]+\.)*([\w-]{1,63})(?:\.(?:\w{3}|\w{2}))(?:$|\/)/i', $Url, $Match); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $Url); $Headers = array(); $Headers[] = 'Host: ' . str_replace(array('http:','/'),array('',''),$Match[0]); $Headers[] = 'User-Agent: Mozilla/5.0 (Linux; U; Android 2.2.1; en-ca; LG-P505R Build/FRG83) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1'; $Headers[] = 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8'; $Headers[] = 'Accept-Language: vi-VN,vi;q=0.8,en-US;q=0.5,en;q=0.3'; $Headers[] = 'Accept-Encoding: gzip, deflate'; $Headers[] = 'DNT: 1'; $Headers[] = 'Cookie: location.href=1; __utma=157483882.1058692669.1446731289.1446731289.1446731289.1; __utmb=157483882.6.10.1446731289; __utmc=157483882; __utmz=157483882.1446731289.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); sinhvienit_popup_ads=true; 5245=5245; __uif=__uid%3A4946267770985296604%7C__ui%3A-1%7C__create%3A1446267770; __cfduid=ddee2b28255737bd950215e046e5f3a7f1446731328; __RC=5; __R=3; __tb=0; __UF=-1; __IP=985296549; __utmt=1'; $Headers[] = 'Cache-Control: max-age=0'; $Headers[] = 'Origin: http://anime47.com'; $Headers[] = 'Referer: ' . $Url; $Headers[] = 'Connection: keep-alive'; curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4); curl_setopt($ch, CURLOPT_ENCODING, 'gzip, deflate'); curl_setopt($ch, CURLOPT_HTTPHEADER, $Headers); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); curl_setopt($ch, CURLINFO_HEADER_OUT, true); curl_setopt($ch, CURLOPT_TIMEOUT, 400); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 0); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); $Data = curl_exec($ch); if(!$Data){ die('Error: "' . curl_error($ch) . '" - Code: ' . curl_errno($ch)); } $HttpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE); curl_close($ch); return $Data; return ($HttpCode>=200 && $HttpCode<300) ? $Data : 'Lỗi trong quá trình lấy dữ liệu'; } Public Function __TVN($Url) { $Source = Anime47::__Curl($Url); preg_match('#http://dll.anime47.com/dien_thoai.php\?url=(.*?).lcq#', $Source, $Match); $DllLink = 'http://dll.anime47.com/dien_thoai.php?url=' . $Match[1]; $DllGet = Anime47::__Curl($DllLink); if (strpos($DllGet, 'lh3.googleusercontent.com')) { preg_match_all('#https://lh3.googleusercontent.com/(.*?)=m([0-9]+)#', $DllGet, $Match_1); for ($i=0; $i < count($Match_1[0]); $i++) { $Link[$i] = $Match_1[0][$i]; } return $Link; } else { return $DllGet; } } } /* ====================================================================================================== */ if (isset($_GET['url'])) { $Object = new Anime47(); $GetLink = $Object->__TVN($_GET['url']); if (is_array($GetLink)) { for ($i=0; $i < count($GetLink); $i++) { Echo $GetLink[$i] . '<br />'; } } else { echo $GetLink; } } else { header('Location: https://www.facebook.com/groups/826847377350704/'); } ?>
Output for 5.0.0 - 7.3.1
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/2i2n5 on line 9
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1
Parse error: parse error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/2i2n5 on line 9
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `T_OLD_FUNCTION' or `T_FUNCTION' or `T_VAR' or `'}'' in /in/2i2n5 on line 9
Process exited with code 255.