Na ja mit SSI schaffst Du es nicht, schließlich heißt SSI ServerSideIncludes und nicht InternetWideIncludes.
Aber im Webmasterbereich bei http://www.GRATISLINKS.de/ hab ich mal einen Link zu folgendem Script gefunden, mit dem geht`s:
#!/usr/bin/perl
################ Installation #####################################################################
#1. Upload lwptest.cgi to your cgi-bin
#2. Change the file permissions (lwptest.cgi) to 755
#3. Go to lwptest.cgi on your server to see if you have the LWP::Simple Perl module.
# If you do not then this scripts will no work.
#4. Upload allinone.cgi to your cgi-bin
#5. Change the file permissions (allinone.cgi) to 755
#6. Test the program by going to http://yourserver.com/allinone.cgi?url=http://yahoo.com
# if it displays Yahoo! then it is working.
#7. To test SSI put
# <!--#exec cgi="serverpath/to/the/directory/allinone.cgi?url=http://yahoo.com" -->
# If you put the HTML file in the same directory as allinone.cgi, then all you need is:
# <!--#exec cgi="/allinone.cgi?url=http://yahoo.com" -->
# if it displays Yahoo! on your webpage, the SSI feature is working fine.
################################## Do not Edit Beyond this Point ##################################
use LWP::Simple;
print "Content-type: text/html\n\n";
&Parse_Form;
$url = $formdata{'url'};
if ($url ne "") {
$html = get $url;
print "$html";
} else {
}
sub Parse_Form {
if ($ENV{'REQUEST_METHOD'} eq 'GET') {
@pairs = split(/&/, $ENV{'QUERY_STRING'});
} elsif ($ENV{'REQUEST_METHOD'} eq 'POST') {
read (STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
@pairs = split(/&/, $buffer);
if ($ENV{'QUERY_STRING'}) {
@getpairs =split(/&/, $ENV{'QUERY_STRING'});
push(@pairs,@getpairs);
}
} else {
print "Content-type: text/html\n\n";
print "<P>Use Post or Get";
}
foreach $pair (@pairs) {
($key, $value) = split (/=/, $pair);
$key =~ tr/+/ /;
$key =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
$value =~ tr/+/ /;
$value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
$value =~s/<!--(.|\n)*-->//g;
if ($formdata{$key}) {
$formdata{$key} .= ", $value";
} else {
$formdata{$key} = $value;
}
}
}
1;
Kann ich eine Datei mittels SSI von einem externen Server mittels
SSI einbinden. Die Zeile
<!--#include virtual="http://www.ulr.de/intern/navigation/navigation.htm"-->
bringt eine Fehlermeldung mit dem Hinweis, die Datei sei nicht vorhanden, bzw. [an error occurred while processing this directive]
Die Datei ist aber definitiv da und SSI ist auch erlaubt! Ich nehme an, sie wird auf dem Server gesucht, von dem die datei mit dem SSI aufgerufen wird.
Was mach ich falsch?