Hi (or bette this timer: Ho, Ho, Ho ) folks.
the tutorial site is really a good work, but the code from SurferTim (greetings and thx a lot 4 ur work) is much better!!!
i tried to make it a little bit clearer for my unprofessional eyes
hope its ok for u Tim if i post it here.
a word to ajax: it is possible to modify Tims code also for ajax use. have tried it out and it works. but i used the original Tims-code for it. if i have make it work for the new one i will post it here for u if anyone think that it helps him (or her).
a question to SurferTim (hope u will read this):
afer the sd file is written there comes a return. in my code i saw, thet it breaks the rotine (so i think) too early. is the return necessary at this place or make i a little mistake?
my code part:
while(client.available()) client.read();
     int scanCount = sscanf(tBuf,"%7s %47s %8s",methodBuffer,requestBuffer,protocolBuffer);
    Â
     if(!checkRequest(&scanCount,client,tBuf,methodBuffer,requestBuffer,paramBuffer,protocolBuffer,fileName,fileType))return;
     if(!checkFile(client, fileName, fileType, tBuf,requestBuffer,methodBuffer)) return;
     else {
      openFile(client, fileName, fileType, tBuf,methodBuffer);
//fragliches return?????????????????????????????????????????????????????????????????????
      return;
     }
     serialPrintTundR(paramBuffer);
ur code part:
myFile.close();Â Â Â Â Â Â Â
#ifdef ServerDEBUG
        Serial.println(F("closed"));
#endif
        client.stop();       Â
#ifdef ServerDEBUG
        Serial.println(F("disconnected"));
#endif
        return;//<---------- this return i mean
       }
       else {
this version of modified Tims code is the first one (finished today). there is much more to do to make it shorter and theres a lot of parameters that i give to functions that not necessary.
hope i helps the one or other to come further withhis server-projekt.
it would be nice if others help me to make it better than it is. my next step is to implement the ajax thing.
PS: please excused my broken english. am not used to comunikate in this language
special thanks and greetings to SurferTim and for all of u a nice and happy chrismas.
last but not least my code from today (edit: in the atachment of the next post): (hope it would be with a slider on the side and no worm over several sites. its my first time that i post here)