Problem with my code for my ethernet power switch

Hi
I have just made a ethernet controled remote switch. It works and all but my problem ia when i upload the code it work on/off a couple of times after that it stops working. I dont know whats wrong with my code. Could any of you check it out and maby give me a tips what i can do to make it work more then a couple of times?

#include <SPI.h>
#include <Ethernet.h>
#include <RemoteTransmitter.h>

ActionTransmitter actionTransmitter(6);

byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
IPAddress ip[] = { 192, 168, 1, 83 }; 
EthernetServer server(80); 

String incoming; 

void setup(){

  
  Ethernet.begin(mac);
  server.begin();


  Serial.begin(9600); 
  Serial.println(Ethernet.localIP()); 
}

void loop(){
  
  EthernetClient client = server.available();
  if (client) {
    while (client.connected()) {
      if (client.available()) {
        char c = client.read();

        
        if (incoming.length() < 100) {

         
          incoming += c; 
          
        } 

        
        if (c == '\n') {

         
          Serial.println(incoming); 
          
             if(incoming.indexOf('?') >=0) { 
               client.println("HTTP/1.1 204 no data");
               client.println();
               client.println();  
             }
             else {
          client.println("HTTP/1.1 200 OK"); 
          client.println("Content-Type: text/html");
          client.println();

          client.println("<html>");
          client.println("<head>");
          client.println("<TITLE> My simple controler </TITLE>");
          client.println("</head>");
          client.println("<body>");

          client.println("<H2>xzenon</H2>");
          client.println("<H4>Turn On/Off LED connected To pin D5 </H4>");
          client.print("<FORM action=\"http://192.168.1.83/\" >");
          client.println("<input type=radio name=LED value= 1>On
"); 
          client.println("<input type= radio name=LED value= 0>Off
"); 
          client.println("<input type= submit value= Submit></FORM>");
         
          client.println("</BODY>");
          client.println("</HTML>");
             }

          delay(1);
          //stopping client
          client.stop();

       
          if(incoming.indexOf("GET /?LED=1") >=0)
          {
            actionTransmitter.sendSignal(1,'A',true);    
            Serial.println("Led On");
          }
          if(incoming.indexOf("GET /?LED=0") >=0)
          {
            actionTransmitter.sendSignal(1,'A',false);    
            Serial.println("Led Off");
          }
          delay(10);
          incoming=" ";//clear 

        }
      }
    }
  }
}

Try this server code. You will need to modify it to meet your needs, but it should not lock up.
http://playground.arduino.cc/Code/WebServerST

You're using the String class, which can be problematic in versions prior to 1.0.4 and is not a good idea IMO in any version. If you can't resolve the stability problem I suggest you get stop using the String class and use plain old c-strings (null-terminated char arrays) instead.

To try to understand what's causing the problem you could comment out all the code relating to the ActionTransmitter and see whether that improves things. It should certainly be possible to produce a plain old web server that is stable.

It should certainly be possible to produce a plain old web server that is stable.

It is, and SurferTim has done that.