If you're receiving binary data back, this function may interest you:
http://aidan.dotgeek.org/lib/?file=function.hexdump.php
Also, why are you messing with chr etc?
$string = "\x00\x01\xFF";
etc.
"Coder_1024" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Thanks for the feedback
Thanks for the feedback. As it turns out, the reason I was getting zero
data bytes in my UDP packet was that I had declared the packet variable
outside the function in which I was using it.
$packet = chr(0x01).chr(0x1d) etc
function doSomething($x)
{
// using $packet in here gives you an
I use the following without problem:
$fp = fsockopen("udp://www.server.com", 24250, &$errno, &$errstr, .2);
if (!$fp) {
$status = "Server not available";
} else {
$trigger =
chr(hexdec('FF')).chr(hexdec('FF')).chr(hexdec('01')).chr(hexdec('00'));
fwrite($fp,$tr
I'm trying to send some binary data to a UDP server using PHP. The examples
I've been able to find show sending binary data over TCP, or they show
sending text over UDP.
I'm constructing the messages using the below:
$text_msg = "Hello, World\r\n";
$binary_msg = chr(0x01).chr(0x02).chr(0x00)
4 matches
Mail list logo