That's some-funny looking code in the first program. It looks like one programmer wrote a "test port" program and a second one expanded it into a http client.
In the header, it looks like we're using an http client with a single parameter.

/*** "GET <resource> HTTP/1.0\n\n" (the second newline is needed for the ***/

However, right here it looks like we're sending a random meaningless string to a server.

/*---Make sure we have the right number of parameters---*/
if ( Count != 3 )
PANIC("usage: testport <IP-addr> <send-msg>\n");

However, what's really going on is we're grabbing a web page from a server by using it's IP address.
Here we grab the IP address (NOT A HOSTNAME) from "Strings" the command line arguments.