Hi, there

Code:
alias sockstart { 
  echo -s * Starting socket sockopen open_socket 127.0.0.1 80 
} 
on *:SOCKOPEN:open_socket: { 
  if $sockerr > 0 { 
    echo -s * Can't connect to socket. 
  } 
  else { 
    sockwrite -nt $sockname GET /socket/index.php HTTP/1.1
    sockwrite -nt $sockname Connection: Keep-Alive 
    sockwrite -nt $sockname Host: 127.0.0.1 
    sockwrite -nt $sockname $str($crlf,2) 
  } 
} 
on *:SOCKREAD:open_socket: { 
  if $sockerr > 0 { 
    echo -s * Error 
  } 
  else { 
    var %read 
    if !$sock($sockname).mark { 
      sockread %read if %read == $null { 
        sockmark $sockname 1 
      } 
    } 
    else { 
      sockread %read 
    } 
    echo -s * %read 
  } 
}


Can anyone find something bad in this script? It makes me crazy. It returns header successfully, but data can't.

/socket/index.php contains code:

Code:
<?PHP 

echo 'data'; 

?>


Regards