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
Image loading
Hi Developers,I'm trying to display an image from images/image.gif getting the url from mysql database.The problem I just can't load the image the url.Code: $image_url =
Error in SQL Syntax HELP!!!
I have this page:Code: <?phpsession_start();//connect to server and select database$conn = mysql_connect("localhost", "root", "") or die(mysql_error());$db =
Do While statement
hi guys,This may sound trivial but im new to php and as part of an assignmenti have to construct the 10 green bottles song using the do while statement. I can do the statement but it is itengrating
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
Help with echo()
I'm having some problems with this code:Code: echo ' <A
How to submit a form to the same page?
I have a table containing information about books in my library and this table has the following columns: id, title, category. What I want to do is to make a form that will allow me to sort these
Date help - fetch dates for Mondays between xxx and yyy?
Does anyone know the best way to do this? I have two dates, say:2010-01-26 and 2010-05-30and I want to return the dates of all the Mondays between them:2010-02-012010-02-082010-02-15....etc.Thanks
Help on Order Entry Form/System Where is best to begin.
I have a dilema and a very short amount of time at this point and I'm looking for some help on deciding where would be best to begin or which is the best way to approach the problem.The company I work
this code is not working????
it says this error.. Warning: Division by zero in ..the variables are correct, so why is the variable $max zero??/Code: $sw = $_GET['w']; $sh = $_GET['h'];
Search function
I am looking for some guidance from the experts.I am trying to create a search function. It will only be searching one table. The search criteria consists of two drop down menus. Each menu lists