PHP Socket connection
<p>I have written the following code using the Unix Socket. I am able to get the content from the server.  When I am execute the below code in the terminal I am able to print the content. But if I execute the code in the browser it is not printing anything. </p>

<pre><code>&lt;?php
$socket = socket_create(AF_UNIX, SOCK_STREAM, 0);
socket_connect($socket, "/tmp/Log");
$msg = 'QUEUE_STATUS$=$abcd';
socket_write($socket, $msg, strlen($msg));
$res = socket_read($socket,100000);
echo $res;
socket_close($socket);
?&gt;
</code></pre>
