www.webdeveloper.com
Results 1 to 2 of 2

Thread: cgi scripting in c/c++?

  1. #1
    Join Date
    Nov 2002
    Posts
    7

    Question cgi scripting in c/c++?

    could someone give me some insight on how to run a c/c++ program, from a cgi script. i would like to do all of this in c/c++ if possible. the program that i would like to execute is displayed below:

    #include <stdio.h>
    #include <fcntl.h>

    char conType[] = "Content-Type: text/html\n\n";

    char wbpgstart[]=
    "<HTML>
    <HEAD>
    <FONT FACE=TAHOMA>
    <TITLE>MAILING LIST</TITLE>
    </HEAD>
    <BODY>
    <CENTER>
    <BR>";

    char thisText[]=
    "<FONT FACE=TAHOMA COLOR=#6495ED SIZE=2><B>THIS IS A TEST!</FONT></B>";

    char wbpgend[]=
    "<BR>
    </CENTER>
    </BODY>
    </HTML>";

    int main()
    {
    printf("%s", conType);

    printf(wbpgstart);

    printf("%s", thisText);

    printf(wbpgend);

    return 0;
    }

  2. #2
    Join Date
    Nov 2002
    Location
    NY, USA
    Posts
    731
    If it is an Apache server you can create a .htaccess file in the directory you want to execute your programs in.

    .htaccess
    AddHandler cgi-script .cgi .pl .exe .dll

    Otherwise, read your server's documentation or contact the administrator if they require you to configure it differently.
    for(split(//,'))*))91:+9.*4:1A1+9,1))2*:..)))2*:31.-1)4131)1))2*:3)"'))
    {for(ord){$i+=$_&7;grep(vec($s,$i++,1)=1,1..($_>>3)-4);}}print"$s\n";

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles