sockets - PHP whitespace before and after a given string need to be considered for byte processing -
i need send 8 bytes given server in socket.
the string should have 8 bytes 3 characters , 5 empty spaces. however, php strips out spaces. how go this?
<?php    $service_name = "pxa     "; //8 bytes    $opt = "code5";     $sendbytes = $service_name . $opt;     //i need sendbytes go pxa     code5    //instead goes pxa code5.          $mysocket->send($sendbytes); ?>  
 
Comments
Post a Comment