You are here

function ckeditor_swf_getinfo in CKEditor SWF - Enhanced Flash embedding plugin 6

Same name and namespace in other branches
  1. 6.2 ckeditor_swf.module \ckeditor_swf_getinfo()
  2. 7 ckeditor_swf.module \ckeditor_swf_getinfo()
1 string reference to 'ckeditor_swf_getinfo'
ckeditor_swf_menu in ./ckeditor_swf.module
Implementation of hook_menu().

File

./ckeditor_swf.module, line 22
24.01.2010 Written by Henri MEDOT <henri.medot[AT]absyx[DOT]fr> http://www.absyx.fr

Code

function ckeditor_swf_getinfo() {
  $info = @getimagesize(check_url($_REQUEST['src']));
  drupal_set_header('Content-Type: text/javascript; charset=utf-8');
  if ($info) {
    print '{mime:"' . $info['mime'] . '", width:' . $info[0] . ', height:' . $info[1] . '}';
  }
  else {
    print 'null';
  }
  exit;
}