under GPL license. // Free like Linux! // converts a string in hex to a bin string function hex2bin ($s) { $n = strlen($s); if ($n % 2 != 0) { return; } for ($x = 1; $x <= $n/2; $x++) { $t .= chr(hexdec(substr($s,2* $x - 2,2))); } return $t; } ?>