functions.php – what does this code do?
-
Hi there,
I am updating a site for someone and in functions.php I found this code that doesn’t appear to do anything. Can anyone tell me it’s purpose?
‘
function get_data($url){
$ch = curl_init();
$timeout = 5;
curl_setopt($ch,CURLOPT_URL,$url);
curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch,CURLOPT_CONNECTTIMEOUT,$timeout);
$data = curl_exec($ch);
curl_close($ch);
return $data;
}
‘Many thanks,
Fiona
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘functions.php – what does this code do?’ is closed to new replies.