socket_recv packet missing bytes PHP
<p>Im trying to receive a packet on PHP, but looks like socket_recv lose some bytes.</p>

<p>I know the packet was sended ok:</p>

<pre><code>0:13:58.951742 IP 192.168.0.101.1458 &gt; 192.168.0.107.8000: Flags [P.], seq 1:7, ack 1, win 64240, length 6
    0x0000:  4500 002e 631d 4000 8006 158c c0a8 0065  E...c.@........e
    0x0010:  c0a8 006b 05b2 1f40 6557 d628 4e87 cadd  ...k...@eW.(N...
    0x0020:  5018 faf0 e808 0000 0068 6f6c 6100       P........hola.
</code></pre>

<p>and the data sended is: 0000 0068 6f6c 6100</p>

<p>but whit:</p>

<pre><code>socket_recv($socket, $buffer, 100, 0);
echo bin2hex($buffer); 
echo unpack("H*", $buffer);
</code></pre>

<p>im getting on both echo's: 00686f6c6100</p>

<p>that means:</p>

<pre><code>sended:  0000 0068 6f6c 6100
receive:   00   68 6f6c 6100
</code></pre>

<p>what im doing wrong?</p>

<p>thanks.</p>

<p>edit: I found the problem. Was on the code.
thanks!</p>
