Haste
public php v1 · immutable<? function get_info($url) { if (function_exists('curl_init')) { $ch = curl_init($url); curl_setopt($ch, CURLOPT_TIMEOUT, 30); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $data = curl_exec($ch); curl_close($ch); } else if (ini_get('allow_url_fopen') == 1) { $data = file_get_contents($url); } else { die("error #3"); } return $data; }