<?php
function strToHex($string)
{
$text = bin2hex($string);
$text = chunk_split($text,2,"\x");
$text = "\x" . substr($text,0,-2);
return $text;
}
$encode = "{text}";
echo strToHex($encode);
?>
<?php
function strToHex($string)
{
$text = bin2hex($string);
$text = chunk_split($text,2,"\x");
$text = "\x" . substr($text,0,-2);
return $text;
}
$encode = "{text}";
echo strToHex($encode);
?>
Comments