Hi,
I'm programming in C Ansi under Unix so a C (and not C++) answer would really be appreciated :)
My program is supposed to get a text file from the net. This part is coded well (I think) and I get the file with 'GET file.txt HTTP/1.1'.
Now I receive the file with a HTTP header like:
HTTP/1.1 200 OK
Date: Mon, 30 sep 2002 13:55:33 GMT
[..]
Content-Type: text/plain
NAME=name1&SURNAME=surname1&ENTER=yes
NAME=name2&SURNAME=surname2&ENTER=yes
NAME=name3&SURNAME=surname3&ENTER=yes
NAME=name4&SURNAME=surname4&ENTER=yes
NAME=name5&SURNAME=surname5&ENTER=yes
I wanted to parse the file to get NAME and SURNAME for each line with a 'while' loop and 'strstr' but it gets the first line and get it over and over..
Please, what's the (best) way to parse a buffer and get all the NAME and SURNAME.
I already have the part to manage the users so just help me with the loop part.
Regards,
Pierrick
