PHP: Hex to String
Mit dieser Funktion lässt sich ein Hexadezimalstring in einen ANSI-String umwandeln.
Erforderlich
PHP 4.0.4 oder höher
Lizenz
Open-Source (GNU GPL)
Quellcode
<?php
function hex2str($hex)
{
for($i=0;$i<strlen($hex);$i+=2)
{
$str.=chr(hexdec(substr($hex,$i,2)));
}
return $str;
}
// *** Groß- bzw. Kleinschreibung ist nicht relevant ***
echo hex2str("616263ab80C7BA78797a");
?>