about CGI

Discussion in 'Perl Misc' started by joker, Aug 16, 2007.

  1. joker

    joker Guest

    I don't know Perl to build a CGI script but I know C++. I need to
    know how the server use a "file.exe" and the html page from the client
    browser. In C++ the data I need to consider is stored in arrays or
    variables. The html page inside the server how is stored? How a
    CGI .exe can find that data? how Perl find data?
     
    joker, Aug 16, 2007
    #1
    1. Advertising

  2. On Aug 16, 5:58 pm, joker <> wrote:
    > I don't know Perl to build a CGI script but I know C++. I need to
    > know how the server use a "file.exe" and the html page from the client
    > browser.


    This appears to be a question about CGI and/or your chosen web server
    software.

    This is a newsgroup about Perl.

    > In C++ the data I need to consider is stored in arrays or
    > variables. The html page inside the server how is stored?


    However you want.

    > How a CGI .exe can find that data?


    Either you have not got your problem clear in your mind or your
    English is not sufficient to express your problem in English. I
    suggest you look for a forum where your native language is spoken and
    where CGI is on-topic.

    > how Perl find data?


    Perl can execute a program written in another language and parse the
    output. Alternatively there are ways to link or embed other languages
    in perl.
     
    Brian McCauley, Aug 16, 2007
    #2
    1. Advertising

  3. joker

    Paul Lalli Guest

    On Aug 16, 12:58 pm, joker <> wrote:
    > I don't know Perl to build a CGI script but I know C++. I need to
    > know how the server use a "file.exe" and the html page from the client
    > browser. In C++ the data I need to consider is stored in arrays or
    > variables. The html page inside the server how is stored? How a
    > CGI .exe can find that data? how Perl find data?



    #!/usr/bin/perl
    use strict;
    use warnings;
    use CGI qw/:standard/;

    print header();
    print start_html("My CGI Results page");
    for my $param_name (param()) {
    my $param_value = param($param_name);
    print p("For the field $param_name, you entered: $param_value");
    }
    print end_html;
    __END__

    For more information, see the documentation of the CGI module at:
    http://perldoc.perl.org/CGI.html

    Paul Lalli
     
    Paul Lalli, Aug 16, 2007
    #3
  4. joker wrote:
    > I don't know Perl to build a CGI script but I know C++.


    Ok, then why don't you use C++ to write that CGI application?

    > I need to
    > know how the server use a "file.exe"


    It may or it may not. Depends how that web server is configurated.

    > and the html page from the client browser.


    ???
    Sorry, that sentence doesn't parse for me.

    > In C++ the data I need to consider is stored in arrays or
    > variables. The html page inside the server how is stored?


    It may be stored statically although that kind of defeats the purpose of CGI
    which is normally used to generated the HTTP response on the fly.

    > How a CGI .exe can find that data? how Perl find data?


    Well, many different ways... Actually the same way a non-CGI-application
    would find the data.

    You really don't give enough relevant information to actually help you.

    jue
     
    Jürgen Exner, Aug 16, 2007
    #4
  5. joker

    joker Guest

    Thanks a lot to all.



    A word to Bryan

    Really my english is so important?? The others guys has answered me
    very well. You have to be more flexible about language...You are on
    internet, DO YOU KNOW THAT?
     
    joker, Aug 17, 2007
    #5
  6. On Aug 17, 4:38 pm, joker <> wrote:
    > Thanks a lot to all.
    >
    > A word to Bryan
    >
    > Really my english is so important?? The others guys has answered me
    > very well. You have to be more flexible about language...You are on
    > internet, DO YOU KNOW THAT?


    I don't care about your poor English so long as you manage to express
    yourself. (I'm not "she who must no be named").

    You may consult my posting history to see that I care very much about
    how well the questions are asked in terms of the asker thinking about
    how they can help the answerer. I care not at all if people use very
    limited English.

    For the record: I don't think _anyone_ understood your question.

    Paul's response only shows that he picked up on the one word "CGI". He
    showed you a simple Perl CGI script and told you to RTFM. I can't
    really see how Paul's example script would help you any more than the
    "Synopsis" section of Perl's CGI manpage. So in effect Paul's response
    was just an RTFM.

    So that's two "we don't understand" responses as one "RTFM" response.

    I gave you the benifit of the doubt and assumed you had a valid
    question that you were unable to express clearely. I did _not_ assume
    you simply could not be bothered to RTFM so I didn't think it would
    help to suggest that you RTFM.

    I am very sorry if I miss-judged you.
     
    Brian McCauley, Aug 18, 2007
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jürgen Exner

    Re: CGI Perl "use CGI" statement fail

    Jürgen Exner, Jul 31, 2003, in forum: Perl
    Replies:
    0
    Views:
    1,613
    Jürgen Exner
    Jul 31, 2003
  2. Shailan
    Replies:
    2
    Views:
    1,154
    Shailan
    Dec 15, 2003
  3. John Smith
    Replies:
    0
    Views:
    3,240
    John Smith
    May 15, 2006
  4. LarsenMTL
    Replies:
    4
    Views:
    850
    Eric Walstad
    Nov 4, 2004
  5. praba kar

    Python-cgi or Perl-cgi script doubt

    praba kar, Jul 30, 2005, in forum: Python
    Replies:
    1
    Views:
    803
    Michael Sparks
    Jul 30, 2005
Loading...

Share This Page