0 MDanz 8 Years Ago i'm trying this below but it isn't working, the page is coming up blank .. <?php $url = 'http://www.realgm.com'; function get_url_contents($url){ $crl = curl_init(); $timeout = 5; curl_setopt ($crl, CURLOPT_URL,$url); curl_setopt ($crl, CURLOPT_RETURNTRANSFER, 1); curl_setopt ($crl, CURLOPT_CONNECTTIMEOUT, $timeout); $ret = curl_exec($crl); curl_close($crl); return $ret; } ?> php Edited 8 Years Ago by MDanz: n/a
0 OS_dev 8 Years Ago i'm trying this below but it isn't working, the page is coming up blank .. <?php $url = 'http://www.realgm.com'; function get_url_contents($url){ $crl = curl_init(); $timeout = 5; curl_setopt ($crl, CURLOPT_URL,$url); curl_setopt ($crl, CURLOPT_RETURNTRANSFER, 1); curl_setopt ($crl, CURLOPT_CONNECTTIMEOUT, $timeout); $ret = curl_exec($crl); curl_close($crl); return $ret; } ?> That all you got or is there more?
0 RoseAug 6 Years Ago call the function after the function definition and use the below code $ret=get_url_contents('http://www.realgm.com';); echo $ret; now the result will be seen