Jump to content

jollyrancher82

Dedicated Members
  • Posts

    919
  • Joined

  • Last visited

Posts posted by jollyrancher82

  1. #include <stdio.h>
    
    #include "CClient.hpp"
    
    
    
    int main(int argc, char** argv)
    
    {
    
        if (argc < 3)
    
        {
    
            printf("Usage:");
    
            printf("t%s <hostname> <port>");
    
            return 0;
    
        }
    
        
    
        CClient* pClient = new CClient();
    
        char* pszRecvMessage = new char[1024];
    
    
    
        pClient->Create();
    
        pClient->Connect(argv[1], atoi(argv[2]));
    
        
    
        pClient->Send("GET / HTTP/1.1rn");
    
        pClient->Send("Accept: */*rn");
    
        pClient->Send("Accept-Language: plrn");
    
        pClient->Send("Accept-Encoding: gzip, deflatern");
    
        pClient->Send("Host: www.google.comrn");
    
        pClient->Send("Connection: Keep-Alivern");
    
        pClient->Send("rn");
    
    
    
        while (pClient->Recv(pszRecvMessage, 1023))
    
        {
    
            printf("%s", pszRecvMessage);
    
        }
    
    
    
        delete [] pszRecvMessage;
    
        delete pClient;
    
        
    
        return 0;
    
    }

    This code was thrown together in a few minutes, and may contain errors (and missing class files which I don't share :))

    Feel free to pay me for the actual CClient.cpp and CClient.hpp code :)

    If you learn basic sockets on Windows, Linux, BSD, or whatever, what you want to do is pretty simple.

  2. God I guess everyone hates me now. I use 7. More features and IMO looks nicer to.I don't care that it has multiple files. And I love the media player so I can play .bin without haveing to burn them to a cd.

    VLC plays .bin

  3. As a final note on EON8.com, this guy and everyone who helped him are total bitches. I blogged about it, it just pisses me off when people think they have great insight into things who dont.

    http://leihai.com/blog/?p=3 - FUCK EON 8

    Before: everyone is interested in it and such.

    After: everyone who was interested now acts as if they knew what was going on, and calls it lame.

    Same old story.

×
×
  • Create New...