|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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
|
|||
|
|||
|
>>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/modules/by-module/LWP/libwww-perl-5.48.tar.gz Readme file at -> http://www.perl.com/CPAN-local/modules/by-module/LWP/libwww-perl-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).] |
![]() |
| Viewing: Dev Shed Forums > Web Design > HTML Programming > Cgi resuts in a html page! |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|