If i use this php command to send commands, it works great:
      $fp = fsockopen("192.168.1.101", 23, $errno, $errstr, 10);
      if (!$fp) {
        $returning = "$errstr ($errno)";
      } else {
        fwrite($fp, $command);
        while (!feof($fp)) {
          $returning = fgets($fp, 30);
        }
        fclose($fp);
      }
But if i try to send something from a shell with netcat, like: printf 'p30' | nc -v -w 5 192.168.1.101 23
It will only work one time, then i have to restart the arduino.
So i guess it doesnt close the connection correctly or something? :-/
But i don't know if it netcats fault, or if it's the arduinos