3v4l.org

run code in 300+ PHP versions simultaneously
<?php if(is_callable('curl_init')){ echo "Enabled"; } else { echo "Not enabled"; } $url = "https://www.google.co.in/?gfe_rd=cr&ei=r8aUVcmeFq_G8Aeq8YDgDw&gws_rd=ssl"; echo $url; $response = getPriceFromFlipkart($url); echo $response; function getPriceFromFlipkart($url) { $curl = curl_init($url); curl_setopt($curl, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 10.10; labnol;) 3v4l.org"); curl_setopt($curl, CURLOPT_FAILONERROR, true); curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true); curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); $html = curl_exec($curl); curl_close($curl); return $html; }

preferences:
35.14 ms | 402 KiB | 5 Q