Thread: testing a cgi script on my computer

  1. #1
    Counter-Strike Master
    Join Date
    Dec 2002
    Posts
    38

    testing a cgi script on my computer

    i need to create a cgi script for my schools website. i compiled a test cgi script to run on my computer to see if it works, but it didnt load in IE.

    i compiled it as i would any other program but renamed it to cgi instead of exe. here is the code but i dont think it matters.
    Code:
    #include <stdio.h>
    
    int main()
    {
    	printf("Content-type: text/html\n\n");
    	printf("<html>\n");
    	printf("<body>\n");
    	printf("<h1>Hello there!</h1>\n");
    	printf("</body>\n");
    	printf("</html>\n");
    	
    	return 0;
    }
    are there any webserver emulators i could try to run this script on? my webhost only provides cgi support to premium members and i am not one.
    You say "Impressive!", but I already know it
    I'm a hardcore player and I'm not afraid to show it

  2. #2
    Yes, my avatar is stolen anonytmouse's Avatar
    Join Date
    Dec 2002
    Posts
    2,544
    You could try this. Free, no install required, and tiny!

    http://www.ritlabs.com/tinyweb/

    This is not an emulator, this is a web server, so be careful.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Major Computer Problem
    By Olidivera in forum Tech Board
    Replies: 10
    Last Post: 07-15-2005, 11:15 AM
  2. Tabbed Windows with MDI?
    By willc0de4food in forum Windows Programming
    Replies: 25
    Last Post: 05-19-2005, 10:58 PM
  3. This is my last night on this computer.
    By joshdick in forum A Brief History of Cprogramming.com
    Replies: 18
    Last Post: 07-12-2003, 01:33 AM
  4. "Premature end of Script Headers"
    By tetradtech in forum Linux Programming
    Replies: 2
    Last Post: 10-09-2002, 10:45 AM
  5. Initiating a file transfer with a CGI script in C++
    By paladin217 in forum C++ Programming
    Replies: 2
    Last Post: 10-04-2002, 06:21 AM