note 44095 modified in function.chr by vrana
| From: | vrana@php.net | Date: | Tue, 17 Aug 2004 14:54:38 +0000 |
| Subject: | note 44095 modified in function.chr by vrana | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-79839@lists.php.net to get a copy of this message | ||
When having to deal with parsing an IIS4 or IIS5 metabase dump I wrote a simple function for
converting those MS hexidecimal values into their ascii counter parts. Hopefully someone will find
use for it.
<?php
function hex_decode($string) {
for ($i=0; $i < strlen($string); $i) {
$decoded .= chr(hexdec(substr($string,$i,2)));
$i = (float)($i)+2;
}
return $decoded;
}
?>
--was--
When having to deal with parsing an IIS4 or IIS5 metabase dump I wrote a simple function for
converting those MS hexidecimal values into their ascii counter parts. Hopefully someone will find
use for it.
function hex_decode($string) {
for ($i=0; $i < strlen($string); $i) {
$decoded .= chr(hexdec(substr($string,$i,2)));
$i = (float)($i)+2;
}
return $decoded;
}
http://php.net/manual/en/function.chr.php