Dave_Sinkula, the code that you posted is very good, i used it on my program, i just had to use a pointer to point where the http begin, but the problem is, your code just print the host, but i need all the URL (cboard.cprogramming.com/online.php).
Well, here is my code to compile:
Thanx for your help.
char *begin, *end, url;
char *headers = "GET http://www.google.com/intl/en/about.html HTTP/1.1\nHost: www.google.com\nAccept: text/html\nAccept: video/mpg\nAccept: image/jpg\nUser-Agent: Mozilla/5.0\n";
if ((begin = strstr(headers, "http")) != NULL)
else if ((begin = strchr(headers, '/')) != NULL)
printf("URL not found\n");
end = strchr(begin, ' ');
length = strlen(begin) - strlen(end);
strncpy(url, begin, length);
/* my output is: http://www.google.com/intl/en/about.htmlç~ */