C++ Sockets. Getting information from a website.
I am trying to read content from web using sockets. using the following code.
int status = getaddrinfo(l_url.c_str(), "http", &l_address, &l_addr_ll);
if (status != 0 ){
printf("\n ***** getaddrinfo() failed: %s\n", gai_strerror(status));
return FAILURE;
}
The code works fine for urls like "www.yahoo.com", "www.google.com" however it doesnt work for url's like "www.google.com/nexus".
Any URL's having a "/" are not working with this code. Am i missing anything?