I have a char all; which will store each network packet. I will convert the hex value into humand readable. Finally I need to extract the url. For e.g. I have this GET /mail/ HTTP/1.1\r\n. I know I can use first to decide if the word GET and HTTP/1.1. exist using this. So I am stuck how to extract the word say in given example "/mail/" ?
char *getPointer = strstr (all, "GET"); char *httpPointer = strstr (all, "HTTP/1."); if (strstr (all, "GET") !==NULL && strstr (all, "HTTP/1."))