3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php error_reporting(0); $sname = "Aftab"; $count = 0; $m = 0; $TP = 60; $uid = "9475332864"; $pwd = "fput7nh"; $start = 1; $cookie = tempnam("/tmp", "CURLCOOKIE"); $agent = "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7"; echo "<h2>$uid </h2>"; $server = "http://ultoo.com"; $url = "$server/login.php"; $url_p = "$server/poll.php"; $url_pc = "$server/PollCompletion.php"; $url_pcc = "$server/PollCompleted.php"; $url_n = "$server/login.php"; $s_c = "$server/secure.php"; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "$url_n"); curl_setopt($ch, CURLOPT_USERAGENT, $agent); curl_setopt($ch, CURLOPT_HTTPHEADER, array("Content-Type: application/x-www-form-urlencoded", "Accept: */*")); curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_REFERER, "$server"); curl_setopt($ch, CURLOPT_AUTOREFERER, 1); $html = curl_exec($ch); preg_match("/<input name=\"(.*?)\" type=\"text\" class=\"(.*?)\" id=\"(.*?)\" maxlength=\"10\"/m", $html, $n); preg_match("/<input name=\"(.*?)\" type=\"password\" class=\"(.*?)\" id=\"(.*?)\" maxlength = \"20\"/m", $html, $p); preg_match("/<input type=\"hidden\" name=\"(.*?)\" value=\"\"/m", $html, $m); $data1 = "$m[1]=\"\"&$n[1]=$uid&$p[1]=$pwd&RememberMe=1&submit2=LOGIN HERE"; echo $data1; curl_setopt($ch, CURLOPT_URL, "$url"); curl_setopt($ch, CURLOPT_USERAGENT, $agent); curl_setopt($ch, CURLOPT_HTTPHEADER, array("Content-Type: application/x-www-form-urlencoded", "Accept: */*")); curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_REFERER, "$url"); curl_setopt($ch, CURLOPT_AUTOREFERER, 1); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, "$data1"); $html = curl_exec($ch); //echo $html; curl_setopt($ch, CURLOPT_URL, "$s_c"); curl_setopt($ch, CURLOPT_USERAGENT, $agent); curl_setopt($ch, CURLOPT_HTTPHEADER, array("Content-Type: application/x-www-form-urlencoded", "Accept: */*")); curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_REFERER, "$url"); curl_setopt($ch, CURLOPT_AUTOREFERER, 1); curl_setopt($ch, CURLOPT_POST, 1); $html = curl_exec($ch); //$sx = simplexml_load_string($html); preg_match_all('/<img[^>]+>/i', $html, $m); echo "<pre>".print_r($m,true); //preg_match_all('/<(?:"[^"]*"[\'"]*|\'[^\']*\'[\'"]*|[^\'">])+>/', $html, $m); //var_dump($sx); //echo "<pre>".print_r($sx,true); ?>
Output for 4.3.2 - 5.6.28, 7.0.0 - 7.1.0
<h2>9475332864 </h2>
Process exited with code 255.
Output for hhvm-3.10.0 - 3.13.2
<h2>9475332864 </h2>=""&=9475332864&=fput7nh&RememberMe=1&submit2=LOGIN HERE<pre>Array ( [0] => Array ( ) )
Output for 4.3.0 - 4.3.1
<h2>9475332864 </h2>