The most (free)hosts support this. why does x10hosting not?
<?php
if( function_exists( 'unpack')) {
echo "Yes" ;
} else {
echo "No" ;
}
echo "<br />" ;
$binarydata = pack("c*", 76, 83, 65, 66);
echo $binarydata ;
echo "<br />" ;
$back = unpack( "c*", $binarydata ) ;
echo var_dump( $back ) ;
echo "<br />" ;
?>
the code give me this: YesIf you are talking about the PHP function unpack, it runs on x10hosting.
Try running
PHP:<?php if( function_exists( 'unpack')) { echo "Yes" ; } else { echo "No" ; } echo "<br />" ; $binarydata = pack("c*", 76, 83, 65, 66); echo $binarydata ; echo "<br />" ; $back = unpack( "c*", $binarydata ) ; echo var_dump( $back ) ; echo "<br />" ; ?>
// If this doesn't return the right signature, it's not a gzip.
$id = unpack('H2a/H2b', substr($data, 0, 2));
if (strtolower($id['a'] . $id['b']) != '1f8b')
return false;
$flags = unpack('Ct/Cf', substr($data, 2, 2));