You are here

function soundcloudfield_curl_get in SoundCloud field 6

Same name and namespace in other branches
  1. 7 soundcloudfield.module \soundcloudfield_curl_get()

Curl helper function.

1 call to soundcloudfield_curl_get()
theme_soundcloudfield_formatter_html5 in ./soundcloudfield.module
Theme function for 'html5' field formatter.

File

./soundcloudfield.module, line 491
SoundCloud CCK field.

Code

function soundcloudfield_curl_get($url) {
  $curl = curl_init($url);
  curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
  curl_setopt($curl, CURLOPT_TIMEOUT, 30);
  curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1);
  $return = curl_exec($curl);
  curl_close($curl);
  return $return;
}