using c++ for web output

This is a discussion on using c++ for web output within the C++ Programming forums, part of the General Programming Boards category; Hi, I want to make it in such a way, that when I call: http://myserver.tld:3000 , a website opens. This ...

  1. #1
    Registered User
    Join Date
    Oct 2005
    Posts
    8

    using c++ for web output

    Hi,

    I want to make it in such a way, that when I call: http://myserver.tld:3000, a website opens. This isn't difficult at all when I use apache (the webserver I'll be using). However, when this page is called, I want a c++ programm to think of the output that should be given to the user.

    How do I do that?

    regards,

    The freak

  2. #2
    Meganan
    Join Date
    Oct 2005
    Posts
    13
    When you say think of an output what do you mean?
    Intelligence is Knowledge, but Wisdom is Depth.
    Stupidity is overwhelming.

  3. #3
    Registered User
    Join Date
    Oct 2005
    Posts
    8
    Quote Originally Posted by Meganan
    When you say think of an output what do you mean?
    Say that I want for example to change config files on the server, and after that, sends it's progress through apache to the browser of the client.

  4. #4
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,852
    Pick a more secure language before your doubts open up a big security hole in your system would be my advice.

    Perhaps this is what you want http://www.w3.org/CGI/
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  5. #5
    Registered User
    Join Date
    Oct 2005
    Posts
    8
    I solved it already by doing it like this:
    PHP Code:
    <?php
    $output 
    system("./a.out var1 var2");
    echo 
    $output;
    ?>
    This works.

    However, Now I need to run my a.out as a specific linux system user, how should I do that?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. code output...
    By roaan in forum C Programming
    Replies: 6
    Last Post: 07-03-2009, 03:22 AM
  2. Help for my output array
    By qwertysingh in forum C Programming
    Replies: 1
    Last Post: 02-17-2009, 03:08 PM
  3. Replies: 4
    Last Post: 11-30-2005, 04:44 PM
  4. Formatting output into even columns?
    By Uncle Rico in forum C Programming
    Replies: 2
    Last Post: 08-16-2005, 06:10 PM
  5. Output problems with structures
    By Gkitty in forum C Programming
    Replies: 1
    Last Post: 12-16-2002, 05:27 AM

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