protected function parse_data_scheme( $str, $extTable ) {
		$data = $name = '';
		if ($fp = fopen('data://'.substr($str, 5), 'rb')) {
			if ($data = stream_get_contents($fp)) {
				$meta = stream_get_meta_data($fp);
				$ext = isset($extTable[$meta['mediatype']])? '.' . $extTable[$meta['mediatype']] : '';
				$name = substr(md5($data), 0, 8) . $ext;
			}
			fclose($fp);
		}
		return array($data, $name);
	}
protected function parse_data_scheme( $str, $extTable ) {
		$data = $name = '';
		if ($fp = fopen('data://'.substr($str, 5), 'rb')) {
			if ($data = stream_get_contents($fp)) {
				$meta = stream_get_meta_data($fp);
				$ext = isset($extTable[$meta['mediatype']])? '.' . $extTable[$meta['mediatype']] : '';
				$name = substr(md5($data), 0, 8) . $ext;
			}
			fclose($fp);
		}
		return array($data, $name);
	}
protected function parse_data_scheme ( $ str , $ extTable ) { $ data = $ name = '' ; if ( $ fp = fopen ( 'data://' . substr ( $ str , 5 ) , 'rb' ) ) { if ( $ data = stream_get_contents ( $ fp ) ) { $ meta = stream_get_meta_data ( $ fp ) ; $ ext = isset ( $ extTable [ $ meta [ 'mediatype' ] ] ) ? '.' . $ extTable [ $ meta [ 'mediatype' ] ] : '' ; $ name = substr ( md5 ( $ data ) , 0 , 8 ) . $ ext ; } fclose ( $ fp ) ; } return array ( $ data , $ name ) ; }
Parse Data URI scheme

@param  string $str
@param  array  $extTable
@return array
@author Naoki Sawada
Parse Data URI scheme