|
static | PrintHexBytes ($string, $hex=true, $spaces=true, $htmlencoding='UTF-8') |
|
static | trunc ($floatnumber) |
|
static | safe_inc (&$variable, $increment=1) |
|
static | CastAsInt ($floatnum) |
|
static | intValueSupported ($num) |
|
static | DecimalizeFraction ($fraction) |
|
static | DecimalBinary2Float ($binarynumerator) |
|
static | NormalizeBinaryPoint ($binarypointnumber, $maxbits=52) |
|
static | Float2BinaryDecimal ($floatvalue) |
|
static | Float2String ($floatvalue, $bits) |
|
static | LittleEndian2Float ($byteword) |
|
static | BigEndian2Float ($byteword) |
|
static | BigEndian2Int ($byteword, $synchsafe=false, $signed=false) |
|
static | LittleEndian2Int ($byteword, $signed=false) |
|
static | BigEndian2Bin ($byteword) |
|
static | BigEndian2String ($number, $minbytes=1, $synchsafe=false, $signed=false) |
|
static | Dec2Bin ($number) |
|
static | Bin2Dec ($binstring, $signed=false) |
|
static | Bin2String ($binstring) |
|
static | LittleEndian2String ($number, $minbytes=1, $synchsafe=false) |
|
static | array_merge_clobber ($array1, $array2) |
|
static | array_merge_noclobber ($array1, $array2) |
|
static | flipped_array_merge_noclobber ($array1, $array2) |
|
static | ksort_recursive (&$theArray) |
|
static | fileextension ($filename, $numextensions=1) |
|
static | PlaytimeString ($seconds) |
|
static | DateMac2Unix ($macdate) |
|
static | FixedPoint8_8 ($rawdata) |
|
static | FixedPoint16_16 ($rawdata) |
|
static | FixedPoint2_30 ($rawdata) |
|
static | CreateDeepArray ($ArrayPath, $Separator, $Value) |
|
static | array_max ($arraydata, $returnkey=false) |
|
static | array_min ($arraydata, $returnkey=false) |
|
static | XML2array ($XMLstring) |
|
static | SimpleXMLelement2array ($XMLobject) |
|
static | hash_data ($file, $offset, $end, $algorithm) |
|
static | CopyFileParts ($filename_source, $filename_dest, $offset, $length) |
|
static | iconv_fallback_int_utf8 ($charval) |
|
static | iconv_fallback_iso88591_utf8 ($string, $bom=false) |
|
static | iconv_fallback_iso88591_utf16be ($string, $bom=false) |
|
static | iconv_fallback_iso88591_utf16le ($string, $bom=false) |
|
static | iconv_fallback_iso88591_utf16 ($string) |
|
static | iconv_fallback_utf8_iso88591 ($string) |
|
static | iconv_fallback_utf8_utf16be ($string, $bom=false) |
|
static | iconv_fallback_utf8_utf16le ($string, $bom=false) |
|
static | iconv_fallback_utf8_utf16 ($string) |
|
static | iconv_fallback_utf16be_utf8 ($string) |
|
static | iconv_fallback_utf16le_utf8 ($string) |
|
static | iconv_fallback_utf16be_iso88591 ($string) |
|
static | iconv_fallback_utf16le_iso88591 ($string) |
|
static | iconv_fallback_utf16_iso88591 ($string) |
|
static | iconv_fallback_utf16_utf8 ($string) |
|
static | iconv_fallback ($in_charset, $out_charset, $string) |
|
static | recursiveMultiByteCharString2HTML ($data, $charset='ISO-8859-1') |
|
static | MultiByteCharString2HTML ($string, $charset='ISO-8859-1') |
|
static | RGADnameLookup ($namecode) |
|
static | RGADoriginatorLookup ($originatorcode) |
|
static | RGADadjustmentLookup ($rawadjustment, $signbit) |
|
static | RGADgainString ($namecode, $originatorcode, $replaygain) |
|
static | RGADamplitude2dB ($amplitude) |
|
static | GetDataImageSize ($imgData, &$imageinfo=array()) |
|
static | ImageExtFromMime ($mime_type) |
|
static | ImageTypesLookup ($imagetypeid) |
|
static | CopyTagsToComments (&$ThisFileInfo) |
|
static | EmbeddedLookup ($key, $begin, $end, $file, $name) |
|
static | IncludeDependency ($filename, $sourcefile, $DieOnFailure=false) |
|
static | trimNullByte ($string) |
|
static | getFileSizeSyscall ($path) |
|
static | mb_basename ($path, $suffix=null) |
| Workaround for Bug #37268 (https://bugs.php.net/bug.php?id=37268) More...
|
|
static getid3_lib::BigEndian2Int |
( |
|
$byteword, |
|
|
|
$synchsafe = false , |
|
|
|
$signed = false |
|
) |
| |
|
static |
Definition at line 263 of file getid3.lib.php.
References $i.
Referenced by getid3_vqf\Analyze(), getid3_szip\Analyze(), getid3_ts\Analyze(), getid3_aa\Analyze(), getid3_au\Analyze(), getid3_avr\Analyze(), getid3_swf\Analyze(), getid3_ogg\Analyze(), getid3_png\Analyze(), getid3_real\Analyze(), getid3_lpac\Analyze(), getid3_id3v2\Analyze(), getid3_midi\Analyze(), getid3_ac3\Analyze(), getid3_quicktime\Analyze(), getid3_riff\Analyze(), getid3_flv\Analyze(), getID3\analyze(), getid3_mp3\decodeMPEGaudioHeader(), getid3_matroska\EBML2Int(), getid3_riff\EitherEndian2Int(), getid3_aac\getAACADTSheaderFilepointer(), AVCSequenceParameterSetReader\getBit(), getid3_matroska\HandleEMBLClusterBlock(), getid3_matroska\HandleEMBLSimpleTag(), getid3_mp3\MPEGaudioHeaderDecode(), getid3_flac\parseAPPLICATION(), getid3_flac\parseCUESHEET(), getid3_matroska\parseEBML(), getid3_id3v2\ParseID3v2Frame(), getid3_flac\parseMETAdata(), getid3_mpc\ParseMPCsv8(), getid3_real\ParseOldRAheader(), getid3_flac\parsePICTURE(), getid3_flac\parseSEEKTABLE(), getid3_flac\parseSTREAMINFO(), getid3_quicktime\QuicktimeParseAtom(), getid3_quicktime\QuicktimeParseContainerAtom(), getid3_quicktime\QuicktimeParseNikonNCTG(), AMFStream\readByte(), and getid3_tiff\TIFFendian2Int().
265 $bytewordlen = strlen($byteword);
266 if ($bytewordlen == 0) {
269 for (
$i = 0;
$i < $bytewordlen;
$i++) {
272 $intvalue += (ord($byteword{
$i}) & 0x7F) * pow(2, ($bytewordlen - 1 -
$i) * 7);
274 $intvalue += ord($byteword{
$i}) * pow(256, ($bytewordlen - 1 -
$i));
277 if ($signed && !$synchsafe) {
279 if ($bytewordlen <= PHP_INT_SIZE) {
280 $signMaskBit = 0x80 << (8 * ($bytewordlen - 1));
281 if ($intvalue & $signMaskBit) {
282 $intvalue = 0 - ($intvalue & ($signMaskBit - 1));
285 throw new Exception(
'ERROR: Cannot have signed integers larger than '.(8 * PHP_INT_SIZE).
'-bits ('.strlen($byteword).
') in self::BigEndian2Int()');
288 return self::CastAsInt($intvalue);
static getid3_lib::iconv_fallback |
( |
|
$in_charset, |
|
|
|
$out_charset, |
|
|
|
$string |
|
) |
| |
|
static |
Definition at line 957 of file getid3.lib.php.
References array.
Referenced by getID3\CharConvert(), getid3_writetags\FormatDataForAPE(), getid3_writetags\FormatDataForID3v1(), getid3_writetags\FormatDataForID3v2(), getid3_writetags\FormatDataForReal(), getid3_writetags\FormatDataForVorbisComment(), getid3_write_id3v2\GenerateID3v2Tag(), getid3_iso\ParseDirectoryRecord(), getid3_id3v2\ParseID3v2Frame(), getid3_iso\ParsePathTable(), getid3_asf\TrimConvert(), and getid3_asf\WMpictureTypeLookup().
959 if ($in_charset == $out_charset) {
964 if (function_exists(
'mb_convert_encoding')) {
965 if ($converted_string = @mb_convert_encoding($string, $out_charset, $in_charset)) {
966 switch ($out_charset) {
968 $converted_string = rtrim($converted_string,
"\x00");
971 return $converted_string;
976 else if (function_exists(
'iconv')) {
977 if ($converted_string = @iconv($in_charset, $out_charset.
'//TRANSLIT', $string)) {
978 switch ($out_charset) {
980 $converted_string = rtrim($converted_string,
"\x00");
983 return $converted_string;
993 static $ConversionFunctionList =
array();
994 if (empty($ConversionFunctionList)) {
995 $ConversionFunctionList[
'ISO-8859-1'][
'UTF-8'] =
'iconv_fallback_iso88591_utf8';
996 $ConversionFunctionList[
'ISO-8859-1'][
'UTF-16'] =
'iconv_fallback_iso88591_utf16';
997 $ConversionFunctionList[
'ISO-8859-1'][
'UTF-16BE'] =
'iconv_fallback_iso88591_utf16be';
998 $ConversionFunctionList[
'ISO-8859-1'][
'UTF-16LE'] =
'iconv_fallback_iso88591_utf16le';
999 $ConversionFunctionList[
'UTF-8'][
'ISO-8859-1'] =
'iconv_fallback_utf8_iso88591';
1000 $ConversionFunctionList[
'UTF-8'][
'UTF-16'] =
'iconv_fallback_utf8_utf16';
1001 $ConversionFunctionList[
'UTF-8'][
'UTF-16BE'] =
'iconv_fallback_utf8_utf16be';
1002 $ConversionFunctionList[
'UTF-8'][
'UTF-16LE'] =
'iconv_fallback_utf8_utf16le';
1003 $ConversionFunctionList[
'UTF-16'][
'ISO-8859-1'] =
'iconv_fallback_utf16_iso88591';
1004 $ConversionFunctionList[
'UTF-16'][
'UTF-8'] =
'iconv_fallback_utf16_utf8';
1005 $ConversionFunctionList[
'UTF-16LE'][
'ISO-8859-1'] =
'iconv_fallback_utf16le_iso88591';
1006 $ConversionFunctionList[
'UTF-16LE'][
'UTF-8'] =
'iconv_fallback_utf16le_utf8';
1007 $ConversionFunctionList[
'UTF-16BE'][
'ISO-8859-1'] =
'iconv_fallback_utf16be_iso88591';
1008 $ConversionFunctionList[
'UTF-16BE'][
'UTF-8'] =
'iconv_fallback_utf16be_utf8';
1010 if (isset($ConversionFunctionList[strtoupper($in_charset)][strtoupper($out_charset)])) {
1011 $ConversionFunction = $ConversionFunctionList[strtoupper($in_charset)][strtoupper($out_charset)];
1012 return self::$ConversionFunction($string);
1014 throw new Exception(
'PHP does not has mb_convert_encoding() or iconv() support - cannot convert from '.$in_charset.
' to '.$out_charset);
Create styles array
The data for the language used.
static getid3_lib::PrintHexBytes |
( |
|
$string, |
|
|
|
$hex = true , |
|
|
|
$spaces = true , |
|
|
|
$htmlencoding = 'UTF-8' |
|
) |
| |
|
static |
Definition at line 18 of file getid3.lib.php.
References $i.
Referenced by getid3_bonk\Analyze(), getid3_vqf\Analyze(), getid3_szip\Analyze(), getid3_bink\Analyze(), getid3_gif\Analyze(), getid3_voc\Analyze(), getid3_wavpack\Analyze(), getid3_dss\Analyze(), getid3_efax\Analyze(), getid3_exe\Analyze(), getid3_tta\Analyze(), getid3_shorten\Analyze(), getid3_ts\Analyze(), getid3_msoffice\Analyze(), getid3_monkey\Analyze(), getid3_mpc\Analyze(), getid3_nsv\Analyze(), getid3_aa\Analyze(), getid3_amr\Analyze(), getid3_au\Analyze(), getid3_rkau\Analyze(), getid3_avr\Analyze(), getid3_optimfrog\Analyze(), getid3_dsf\Analyze(), getid3_png\Analyze(), getid3_la\Analyze(), getid3_swf\Analyze(), getid3_bmp\Analyze(), getid3_midi\Analyze(), getid3_flac\Analyze(), getid3_asf\Analyze(), getid3_riff\Analyze(), getid3_dts\Analyze(), getid3_flv\Analyze(), getid3_mp3\decodeMPEGaudioHeader(), getid3_mp3\FreeFormatFrameLength(), getid3_optimfrog\ParseOptimFROGheader45(), getid3_riff\ParseRIFFAMV(), getid3_quicktime\QuicktimeParseAtom(), and getid3_zip\ZIPparseLocalFileHeader().
20 for (
$i = 0;
$i < strlen($string);
$i++) {
22 $returnstring .= str_pad(dechex(ord($string{
$i})), 2,
'0', STR_PAD_LEFT);
24 $returnstring .=
' '.(preg_match(
"#[\x20-\x7E]#", $string{
$i}) ? $string{
$i} :
'¤');
30 if (!empty($htmlencoding)) {
31 if ($htmlencoding ===
true) {
32 $htmlencoding =
'UTF-8';
34 $returnstring = htmlentities($returnstring, ENT_QUOTES, $htmlencoding);