You are here

function _image_ncck_photobucket_scrape_image_title in Embedded Media Field 5

Visit the image URL and scrape the image title from HTML.

Parameters

String $url: Image URL.

Return value

String Image title.

1 call to _image_ncck_photobucket_scrape_image_title()
image_ncck_photobucket_image_title in contrib/image_ncck/providers/photobucket.inc
implement image_ncck_PROVIDER_image_title

File

contrib/image_ncck/providers/photobucket.inc, line 111

Code

function _image_ncck_photobucket_scrape_image_title($url) {
  static $title;
  if (isset($title[$url])) {
    return $title[$url];
  }
  $rs = drupal_http_request($url);
  $html = $rs->data;
  return $title[$url] = preg_match('@<span id="photoTitle">(.+?)</span>@is', $html, $matches) ? $matches[1] : '';
}