3v4l.org

run code in 300+ PHP versions simultaneously
<?php // include 'conn.php'; // include_once 'tools/curl.php'; if ($_GET['url']) { $url=$_GET['url']; } else { $url="http://free.yoyokiss.com/vod/"; if ($_GET['w']) { $w=$_GET['w']; } else { $w="MP4"; } $html=file_get_contents($url); $html = iconv("gbk", "UTF-8", $html); $pat = "/<a(.*?)href=\"(.*?)\"(.*?)>(.*?".$w.")<\/a>/i"; preg_match_all($pat, $html, $m); $m=($m[2]); if ($_GET[sleep]){ for ($i=0;$i<sizeof($m);$i++) { $t=$m[$i]; echo $t; $md5file='/file/'.md5($t).'.MP4'; echo "<a href=http://$_SERVER[HTTP_HOST]$md5file>播放</a>"; echo " || "; echo "<a href=http://$_SERVER[HTTP_HOST]/tools/curl.php?url=$t>缓存到服务器</a>"; echo "<br>"; } }else if ($_GET[c]) { $ssh_name=date("His").".ssh"; $ssh_path="/usr/local/nginx/html/file/".$ssh_name; $f=fopen($ssh_path,"w"); fwrite ($f,"#!/bin/sh"); fwrite ($f,"\n"); for ($i=0;$i<sizeof($m);$i++) { $t=$m[$i]; if (!file_exists("/usr/local/nginx/html/file/".md5($t).".MP4")) { fwrite ($f,"wget '$t' -O /usr/local/nginx/html/file/".md5($t).".MP4"); fwrite ($f,"\n"); } } fwrite($f,"rm -f ".$ssh_path); fclose($f); exec("chmod 711 $ssh_path"); exec($ssh_path); echo "缓存已提交"; }else{ for ($i=0;$i<sizeof($m);$i++) { $t=$m[$i]; echo $t; $t1=urlencode($t); //转换url //$t2 = iconv("UTF-8", "GB2312", $t); echo "<a href='$t'>播放</a>"; echo " || "; echo "<a href=http://$_SERVER[HTTP_HOST]/tools/curl.php?url=$t>缓存到服务器</a>"; echo "<br>"; $r=mysql_query("select url from vod_zp where url='$t'",$con); if (mysql_num_rows($r)<1){ mysql_query("insert into vod_zp(url,urlen,createtime) values('$t','$t1',now())",$con); } } mysql_close($con); } ?>
Output for 5.4.0 - 5.4.40, 5.5.24, 5.6.8
Parse error: syntax error, unexpected end of file in /in/fEanZ on line 66
Process exited with code 255.
Output for 5.3.0 - 5.3.29
Parse error: syntax error, unexpected $end in /in/fEanZ on line 66
Process exited with code 255.

preferences:
210.47 ms | 1395 KiB | 79 Q