Ok, I understant the '<','/','s','p','a','n' problem, changed it to the 's' letter, (now i understand why the C example only used a '#' tu cut the string);
I also added a Serial.print(data) to see what the arduino is receiving. here it goes (i know it's a bit messy, sorry):
Code:
void printData(char* data, int len) {
Serial.print(data);
if (len-- > 0) {
char *resultat= NULL;
resultat = strtok(data, "s"); //cut data into pieces when s is found
if( !resultat){
// otput debug error if nothing of the sort is found
Serial.println("not working!");
}
while (resultat != NULL){
Serial.println("result is");
Serial.println(resultat );
resultat = strtok(NULL, "s");
}
}
}
result:
Connexion wifi lanceeHTTP/1.1 200 OK
Date: Wed, 25 Apr 2012 12:33:30 GMT
Server: Apache
Last-Modified: Wed, 25 Apr 2012 09:46:23 GMT
ETag: "816e4162-64-4be7dbe893ec6"
Accept-Rangesresult is
HTTP/1.1 200 OK
Date: Wed, 25 Apr 2012 12:33:30 GMT
Server: Apache
La
result is
t-Modified: Wed, 25 Apr 2012 09:46:23 GMT
ETag: "816e4162-64-4be7dbe893ec6"
Accept-Range
: bytes
Content-Length: 100
Connection: close
Content-Type: text/html
Content-Length: 100
Connection: clo
result is
e
Content-Type: text/html