#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2000
    Posts
    6
    Rep Power
    0
    I want to put the result of a .cgi file in a html page, what I mean is that I want to embebed the .cgi file into a .html file.
    I can't use SSI because the .CGI file is in other server.

    Any suggestions!?
    Thanks
    Rui
  2. #2
  3. No Profile Picture
    freebsd
    Guest
    Devshed Newbie (0 - 499 posts)
    >>I can't use SSI because the .CGI file is in other server

    You actually can.

    1) http://yourserver.com/cgi-bin/grap.cgi

    #!/usr/local/bin/perl
    print "Content-type: text/htmlnn";
    use LWP::Simple;
    $target_file = "http://otherserver.com/cgi-bin/script.cgi";
    my $file = get($target_file);
    print "$filen";

    2) http://yourserver.com/myfile.html

    <html>
    <body>
    <!--#include virtual="cgi-bin/grab.cgi"-->
    </body>
    </html>

    To use Simple.pm, you need to download http://www.perl.com/CPAN-local/modul...rl-5.48.tar.gz
    Readme file at -> http://www.perl.com/CPAN-local/modul...rl-5.48.readme

    If that cgi script on other server only accepts POST method, you then need to use UserAgent.pm. For GET method, Simple.pm should be fine.

    Please note this message has nothing to do with javascript. Please post similar message to Perl forum next time.

    [This message has been edited by freebsd (edited June 28, 2000).]

Similar Threads

  1. Kinda new to html. VERY new to perl & cgi. How's it all work?
    By WorldBuilder in forum Perl Programming
    Replies: 12
    Last Post: October 21st, 2003, 10:54 AM
  2. Trouble inserting 2 scripts into html page
    By gundamcata in forum HTML Programming
    Replies: 0
    Last Post: October 2nd, 2003, 10:35 AM
  3. displaying html code on PHP generated page
    By safas in forum PHP Development
    Replies: 7
    Last Post: September 18th, 2003, 02:54 PM
  4. Call remote PHP script on HTML page
    By PHPme in forum PHP Development
    Replies: 5
    Last Post: March 27th, 2003, 01:22 PM
  5. Show HTML page while running LARGE query?
    By jamoss in forum PHP Development
    Replies: 1
    Last Post: February 21st, 2003, 07:48 PM

IMN logo majestic logo threadwatch logo seochat tools logo