Hi,

I have a basic spider that goes and downloads a webpage. It works fine except it returns the complete webpage and then an extra bit.

I enclosed recv inside of a while statement:

Code:
while(numbytes = recv(sockfd, buf, MAXDATASIZE - 1, 0))
       {
       printf(buf);
       }

Is this the right way to do this?