3v4l.org

run code in 300+ PHP versions simultaneously
<?php $movie = "http://captainamericacivilwarmovie.pro/"; function scrape($URL){ //cURL options $options = Array( CURLOPT_RETURNTRANSFER => TRUE, //return html data in string instead of printing it out on screen CURLOPT_FOLLOWLOCATION => TRUE, //follow header('Location: location'); CURLOPT_CONNECTTIMEOUT => 60, //max time to try to connect to page CURLOPT_HEADER => FALSE, //include header CURLOPT_REFERER => 'http://captainamericacivilwarmovie.pro/', CURLOPT_USERAGENT => "Mozilla/5.0 (X11; Linux x86_64; rv:21.0) Gecko/20100101 Firefox/21.0", //User Agent CURLOPT_URL => $URL //SET THE URL ); $ch = curl_init($URL); curl_setopt_array($ch, $options); $data = curl_exec($ch); curl_close($ch); preg_match_all('/<iframe .* src=\"(.*?)\" .*><\/iframe>/', $data, $matches); $retData=''; echo '<pre>'; print_r( $matches); echo '</pre>'; if($matches[1][1] != null){ $retData=$matches[1][1]; }else if($matches[1][0] != null){ $retData=$matches[1][0]; }else $retData=''; echo $retData; } scrape($movie); ?>
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught Error: Undefined constant "CURLOPT_RETURNTRANSFER" in /in/k0ufc:7 Stack trace: #0 /in/k0ufc(41): scrape('http://captaina...') #1 {main} thrown in /in/k0ufc on line 7
Process exited with code 255.

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
59.54 ms | 401 KiB | 8 Q