Over a million developers have joined DZone.

CPP Web Crawler

·
Another program I found in my old source code directory.  This looks like another web crawler designed to run in Windows.


// http.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#include 
#include 
#include 


#define MAX_LENGTH 4096


void main()
      {
          int s_len;
          int skt_Smtp;
          int success;
		  int i;
          struct sockaddr_in st_Sockaddr;
		  char                 recv_Buf[MAX_LENGTH];
          char send_Buf[MAX_LENGTH];

          //Initialize Sockets
          WSADATA wsa;
          WSAStartup(MAKEWORD(2, 0), &wsa);


          skt_Smtp = socket(AF_INET,SOCK_STREAM,0);
          if (skt_Smtp < 0)
          {
              cout<< "Error Creating Socket"< MAX_LENGTH)
			i = MAX_LENGTH;
		printf("%-*.*s", i, i, recv_Buf);
	}
	while(i != 0);


         WSACleanup();
}
}

Topics:

The best of DZone straight to your inbox.

SEE AN EXAMPLE
Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.
Subscribe

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}