function devel_image_provider_get_file

cis7 devel_image_provider.module devel_image_provider_get_file($url, $filename, $method = 'curl')
cle7 devel_image_provider.module devel_image_provider_get_file($url, $filename, $method = 'curl')
elmsmedia7 devel_image_provider.module devel_image_provider_get_file($url, $filename, $method = 'curl')
icor7 devel_image_provider.module devel_image_provider_get_file($url, $filename, $method = 'curl')
meedjum_blog7 devel_image_provider.module devel_image_provider_get_file($url, $filename, $method = 'curl')
mooc7 devel_image_provider.module devel_image_provider_get_file($url, $filename, $method = 'curl')

Return file of $url using selected get_method

8 calls to devel_image_provider_get_file()
BaconmockupProvider::generateImage in sites/all/modules/ulmus/devel_image_provider/plugins/devel_image_provider/provider/BaconmockupProvider.class.php
Image generation handler.
DummyImageProvider::generateImage in sites/all/modules/ulmus/devel_image_provider/plugins/devel_image_provider/provider/DummyImageProvider.class.php
Image generation handler.
FlickholdrProvider::generateImage in sites/all/modules/ulmus/devel_image_provider/plugins/devel_image_provider/provider/FlickholdrProvider.class.php
Image generation handler.
LorempixumProvider::generateImage in sites/all/modules/ulmus/devel_image_provider/plugins/devel_image_provider/provider/LorempixumProvider.class.php
Image generation handler.
PlaceamanateeProvider::generateImage in sites/all/modules/ulmus/devel_image_provider/plugins/devel_image_provider/provider/PlaceamanateeProvider.class.php
Image generation handler.

... See full list

File

sites/all/modules/ulmus/devel_image_provider/devel_image_provider.module, line 146
Module file that exposes the options to select an external image provider to generate images.

Code

function devel_image_provider_get_file($url, $filename, $method = 'curl') {
  $data = NULL;

  switch ($method) {
    case 'curl':
      $data = devel_image_provider_file_get_data_curl($url);
      file_put_contents($filename, $data);
      break;
    case 'gd':
      $image = imagecreatefromjpeg($url);
      imagejpeg($image, $filename);
      imagedestroy($image);
      break;
    case 'file_get_contents':
      $data = file_get_contents($url);
      file_put_contents($filename, $data);
      break;
  }

  return $filename;
}
Error | ELMSLN API

Error

×

Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/api.elmsln.org/includes/common.inc:2791) in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/api.elmsln.org/sites/all/modules/apc/drupal_apc_cache.inc).
The website encountered an unexpected error. Please try again later.