HTTP GET Index Command :: Winsock

This is a discussion on HTTP GET Index Command :: Winsock within the Windows Programming forums, part of the Platform Specific Boards category; Hi. I am working on a HTTP client. I want the program to download a specific webpage. The program initializes ...

  1. #1
    Registered User
    Join Date
    Nov 2001
    Posts
    1,348

    HTTP GET Index Command :: Winsock

    Hi.

    I am working on a HTTP client. I want the program to download a specific webpage. The program initializes a connection to the web server and requests index.html.

    GET index.html

    However, for some reason most web servers I tried have responded with errors about bad requests. I would like to know what is the HTTP command to download a website such as index.html?

    Thanks,
    Kuphryn

  2. #2
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Posts
    5,439
    The server expects to linefeeds.

    try:

    GET /index.html \r\n\r\n
    Code:
    int main(void){srand(time(0));for(double l=rand(),l0=0,l00=0;;l0+=0.1){for(double l000=0;l000
    <1;l000+=.001,l+=((double)rand()/RAND_MAX)/0x64,l00+=((sin(l*0x8*atan(l0)*l000-(l0*0x8*atan
    (l)))*0.5)+0.5)){l00-=floor(l00);for(size_t l0000=0,l00000=(size_t)(0x50*(l00));l0000<l00000;++l0000
    )putchar(0x20);putchar(0x61+(int)((double)rand()/RAND_MAX*0x1a));putchar('\n');}}return 0;}

  3. #3
    Registered User
    Join Date
    Nov 2001
    Posts
    1,348
    Okay. Thanks.

    Kuphryn

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. how to combine these working parts??
    By transgalactic2 in forum C Programming
    Replies: 0
    Last Post: 02-01-2009, 07:19 AM
  2. 20q game problems
    By Nexus-ZERO in forum C Programming
    Replies: 24
    Last Post: 12-17-2008, 04:48 PM
  3. Reiventing the wheel (again)
    By Elysia in forum C++ Programming
    Replies: 5
    Last Post: 12-02-2007, 02:26 AM
  4. Function to check memory left from malloc and free?
    By Lechx in forum C Programming
    Replies: 4
    Last Post: 04-24-2006, 05:45 AM
  5. file index update error
    By daluu in forum C Programming
    Replies: 1
    Last Post: 04-28-2003, 02:47 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21