3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(0); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "http://80.211.175.169:7112/22.php"); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $headers = array(); $headers[] = "User-Agent: Dalvik/1.6.0 (Linux; U; Android 4.4.4; Lenovo P90 Build/S100)"; $headers[] = "Host: swiftstreamz.com"; $headers[] = "Content-Encoding: gzip"; $headers[] = "Connection: Keep-Alive"; $headers[] = "Authorization: Basic QFN3aWZ0MTExIzpAU3dpZnQxMTEj"; curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); $res = curl_exec($ch); $package = json_decode($res,true); $package = $package['#EXTM3U']; $f = fopen('links.php','w'); $p = fopen('playlist.m3u','w'); fwrite($f,"<?php\n\$url = array(\n"); fwrite($p,"#EXTM3U\n"); foreach ($package as $id ) { $url = "http://80.211.175.169:7112/22.php".$id['cid']; curl_setopt($ch, CURLOPT_URL,$url ); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 1); curl_setopt($ch, CURLOPT_TIMEOUT, 2); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $headers = array(); $headers[] = "User-Agent: Dalvik/1.6.0 (Linux; U; Android 4.4.4; Lenovo P90 Build/S100)"; $headers[] = "Host: swiftstreamz.com"; $headers[] = "Content-Encoding: gzip"; $headers[] = "Connection: Keep-Alive"; $headers[] = "Authorization: Basic QFN3aWZ0MTExIzpAU3dpZnQxMTEj"; $res = json_decode(curl_exec($ch),true); $res = $res['#EXTM3U']; foreach ($res as $channel) { $chann = str_replace (" ","",$channel['channel_title']); $stream = $channel['channel_url']; $cn = str_replace (" ","",$channel['category_name'])."_"; if (strpos($stream,".mp4") !== false ) { echo "skip video $chann\n"; } else { $login =""; $password =""; curl_setopt($ch, CURLOPT_URL, "http://80.211.175.169:7112/22.php"); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 1); curl_setopt($ch, CURLOPT_TIMEOUT, 2); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC); curl_setopt($ch, CURLOPT_USERPWD, "$login:$password"); $headers = array(); $headers[] = "User-Agent: Dalvik/1.6.0 (Linux; U; Android 4.4.4; Lenovo P90 Build/S100)"; $headers[] = "Host: 80.211.175.169:7112"; $headers[] = "Content-Encoding: gzip"; $headers[] = "Content-Type: text/html"; $headers[] = "Connection: Keep-Alive"; curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); $token = curl_exec($ch); curl_setopt($ch, CURLOPT_URL,$stream.$token ); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET"); $res = curl_exec($ch); if((strpos($res,"Forbidden") !== false) || is_null($res) || empty($res) ) { echo "skip invalid token $cn$chann\n"; } else { fwrite($f,"'$cn$chann' => '$stream',\n"); fwrite($p,"#EXTINF:-1,".$cn.$chann."\n"); fwrite($p,"http://80.211.175.169:7112/".$cn.$chann.".m3u8\n"); } } } } fwrite($f,");");
Output for 5.6.38, 7.1.0 - 7.1.23, 7.2.0 - 7.2.33, 7.3.16 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.19, 8.3.0 - 8.3.4, 8.3.6 - 8.3.7

Process exited with code 255.
Output for 8.3.5
Warning: PHP Startup: Unable to load dynamic library 'sodium.so' (tried: /usr/lib/php/8.3.5/modules/sodium.so (libsodium.so.23: cannot open shared object file: No such file or directory), /usr/lib/php/8.3.5/modules/sodium.so.so (/usr/lib/php/8.3.5/modules/sodium.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
Process exited with code 255.

preferences:
183.73 ms | 401 KiB | 175 Q