3v4l.org

run code in 300+ PHP versions simultaneously
<?php $curl = curl_init("https://www.facebook.com/plugins/fan.php?connections=10000&id=15087023444"); curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1); curl_setopt($curl, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20100101 Firefox/15.0.1"); curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0); curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 0); $data = curl_exec($curl); curl_close($curl); $data = preg_replace("%(.*?)(<div id.*?>)%is","",$data); echo "HOLA\n"; $text = file_get_contents('rawnike.php'); // $text = file_get_contents('http://www.facebook.com/plugins/fan.php?connections=10000&id=15087023444'); $text = preg_replace("/<script[^>]+\>/i", "", $text); $text = preg_replace("/<img[^>]+\>/i", "", $text); $pattern = '!(https?://[^\s]+)!'; // refine this for better/more specific results if (preg_match_all($pattern, $text, $matches)) { list(, $links) = ($matches); //print_r($links); //var_dump($links); } unset($links[0]);unset($links[1]);unset($links[2]);unset($links[3]);unset($links[4]);unset($links[5]);unset($links[6]);unset($links[7]); //var_dump($links); $links=str_replace('https','http',$links); $links=str_replace('\"','',$links); foreach ($links as $value) { echo "fb user ID: $value<br />\n"; }

preferences:
38.94 ms | 402 KiB | 5 Q