You are here

soundcloudfield.module in SoundCloud field 8

Same filename and directory in other branches
  1. 6 soundcloudfield.module
  2. 7 soundcloudfield.module

@author Attila Fekete - http://drupal.org/user/762986

File

soundcloudfield.module
View source
<?php

/**
 * @file
 *
 *
 *
 * @author Attila Fekete - http://drupal.org/user/762986
 */
define('SOUNDCLOUDFIELD_DEFAULT_WIDTH', 100);
define('SOUNDCLOUDFIELD_DEFAULT_HTML5_PLAYER_HEIGHT', 166);
define('SOUNDCLOUDFIELD_DEFAULT_HTML5_PLAYER_HEIGHT_SETS', 450);

// Usable sizes for visual player: 300, 450, 600.
define('SOUNDCLOUDFIELD_DEFAULT_VISUAL_PLAYER_HEIGHT', 450);

/**
 * Curl helper function.
 */
function _soundcloudfield_curl_get($url) {
  $curl = curl_init($url);
  curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
  curl_setopt($curl, CURLOPT_TIMEOUT, 30);

  //  if (variable_get('soundcloudfield_curl_followlocation', FALSE)) {
  //    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1);
  //  }
  $return = curl_exec($curl);
  curl_close($curl);
  return $return;
}