Converter uma string em hex para binário
Com o código abaixo você
poderá converter rapidamente uma string em hex
para binário. E nem se preocupe em usar a pack,
esta função abaixo é bem mais simples.
<?PHP
// Function Hex2Bin
// By Roberto Bertó <berto@que.com.br> 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;
}
?>
Logitech traz o G305 X Superlight ao Brasil com 130 horas de bateria
Logitech começou a vender o G305 X Superlight no mercado brasileiro em 16 de setembro. O preço sugerido ficou em R$ 449,90.






Redação iMasters





