I need some help please, I am trying sending command to my device via stream_socket,but the problem is there is no response from the device.


PHP Code:
   $file fopen('response.log','a');
    
$server stream_socket_server('tcp://'.$serverip.':'.$port$errno$errormessage);

    if(!
$server) {
        echo 
"$errormessage($errno)\r\n";
    }
    else{

        while(
$client = @stream_socket_accept($server)){
            
stream_socket_sendto($client$commandSTREAM_OOB);
            
$dataresponse=stream_socket_recvfrom($client1500STREAM_OOB);
            
fwrite($file,$dataresponse);
            
fclose($file);
            
fclose($client);
        }


    } 
Thank you in advance.