I'm trying to get some text from various parts of a file. I have converted the file to hex (bin2hex) and I've got this:
64 72 e6 62 65 72 (without spaces)
I'm converting that back by:
Code: <?php
function hex2bin($h)
{
if (!is_string($h)) return null;
$r='';
for ($a=0; $a<strlen($h); $a+=2)
$r .= chr(hexdec($h{$a}.$h{($a+1)}));
return $r;
}
?>
It works fine, except for unicode characters. For example, the above hex is giving me:
dr�ber
While it must be:
dræber
How can I get the correct word?
Thanks
PHP5/Zend 2.0 - Resources
PHP5 Snapshots
How to read posted binary data from a mobile device and post it to a web server?
Here is the senario...I have a mobile device (MD) that posts binary data to a Web Server (WS1) and that Web Server (WS1) posts that binary data (from the MD) to another Web Server (WS2).(MD)
Spaghetti Code
So.I've pretty much reached the point where I have so many isset s on one page that I can't tell what the page is supposed to do. In other words: spaghetti code. I just read a few tutorials on OOP,
How to restrict the display of report variants
Hello All,
serializing objects - loses methods - the point being?
HiI know that serializing an object will lose the methods. But whats the point in that? What if we need the methods . Lets say the serialized string is sent from an external server where the calling
understanding functions and classes
Code: [Select]class person { var $name = "Jimmy Goe"; function get_name(){ echo $this->name; }} I am playing with this very small script that I made using a
how to timeout $doc = new DOMDocument()->load($url)
I am currently using this $doc->load($url) to fetch an rss feed.If a feed takes long than 20 seconds to download, I wish to terminate it and proceed to the next, is there any way of terminating
Javascript or not?
How many people prefer javascript/ajax sites? How many prefer the good old fashion straight php sites?
help with this code please?
Hello,I am trying to build a remote upload script for my image hosting site.I am using $_GET for testing purposes.this would be the url you would visit:Code:
my sql select id and then update problem.
I need to select some auto incremented ids out of a database and then use those id in a where statement which updates the database at the id's location the below code works up to the update statements