Hello,
I have a situation where I need to send a query in the form of "byte array" to a remote server and then receive the response back also in the form of "byte array". Can anyone post an example in PHP using sockets? I'd really appreciate any help on that.
thanks in advance,
Adriano
In PHP characters and bytes are the same thing, so a byte array is just an array of characters, and in fact just writing a string to the socket would be doing it. You can use the [man]sscanf[/man]/[man]printf[/man] and related functions if you like.
Actually, I cannot figure out how to form the packet in php and send it through sockets as described in the image attached. Can anyone post a hint? Any help on that would be greatly appreciated.
Thanks in advance,