Hey,
I have made a small script to convert Hex to Ascii, but for some reason I get the following error when I run it:
Fatal error: Maximum execution time of 30 seconds exceeded in /usr/local/apache/htdocs/asctohex.php on line 5
Here is my script:
<?php
function Val($string) {
for ($i = 0; $i <= strlen($string); $i++) {
if (is_numeric($string{$i})) {
$tstring .= $string{$i};
}
}
return $tstring;
}
function HexToAsc($hstr) {
for ($n = 1; $n <= strlen($hstr); $n + 2) {
$nstr = $nstr + chr(Val("&H" . substr($hstr, $n, 2)));
}
return $nstr;
}
print HexToAsc("6666666666666");
?>
Thanks in advance.