Get website source
<p>So I have this source which gets the source from a website:</p>

<pre><code>WSADATA wsaData;

if (WSAStartup(MAKEWORD(2,2), &amp;wsaData) != 0) {
            cout &lt;&lt; "WSAStartup failed.\n";
    system("pause");
            return 1;
}

    SOCKET Socket=socket(AF_INET,SOCK_STREAM,IPPROTO_TCP);

    struct hostent *host;
    host = gethostbyname("www.site.com");

    SOCKADDR_IN SockAddr;
    SockAddr.sin_port=htons(80);
    SockAddr.sin_family=AF_INET;
    SockAddr.sin_addr.s_addr = *((unsigned long*)host-&gt;h_addr);

    cout &lt;&lt; "Connecting...\n";
    if(connect(Socket,(SOCKADDR*)(&amp;SockAddr),sizeof(SockAddr)) != 0){
            cout &lt;&lt; "Could not connect";
            system("pause");
            return 1;
    }
    cout &lt;&lt; "Connected.\n";

    send(Socket,"GET / HTTP/1.1\r\nHost: www.site.com/auth.php\r\nConnection: close\r\n\r\n", strlen("GET / HTTP/1.1\r\nHost: www.site.com/auth.php\r\nConnection: close\r\n\r\n"),0);
    char buffer[10000];

    int nDataLength;
    while ((nDataLength = recv(Socket,buffer,10000,0)) &gt; 0){               
            int i = 0;
            for(; i != nDataLength; ++i)
                    cout &lt;&lt; buffer[i];
    }

    closesocket(Socket);
    WSACleanup();
</code></pre>

<p>The problem is, its not navigating to auth.php. Also, how would I send GET vars like ?name=bleh</p>
