How can I get the byte array from some string witch can contains numbers,letters and so on!? If u are familiar with java I am looking for same functionality of getBytes() method.
I tried with snippet like this one:
for($i = 0; $i < strlen($msg); $i++){
$data.=ord($msg[$i]);
//or $data[]=ord($msg[$1]);
}
but without success I think, so any kind of help will be apreciated.
Ps. Why do I need this at all!? Well I need to send via fputs() bytearray to server written in java...