Gossamer Forum
Home : Products : Links 2.0 : Customization :

Can i insert header or footer from remote file f

Quote Reply
Can i insert header or footer from remote file f
(http://www.alabala.com/head.html) on my search results page?

I want to insert in my html code on search page:

#<form action="http://www.albala.com/search.cgi" method="GET">
#<input type="text" size=15 name="query">
#<input type=submit value="Search!">
#<input name="header" type= hidden value="http://www.blabla.com/head.html">
#</form>
Can someone help me?

Quote Reply
Re: Can i insert header or footer from remote file f In reply to
Not very easily...You could use LWP to pull that file into your search page.

Regards,

Eliot Lee

Quote Reply
Re: Can i insert header or footer from remote file f In reply to
OK, but haw?
Can you help me?

Quote Reply
Re: Can i insert header or footer from remote file f In reply to
Ok buddy try this,

Create a file with the following content in it

#!/usr/bin/perl

use LWP::Simple;
my $external_page = get('http://www.yourserver.com/yourheader.html');

print "Content-type: text/html\n\n";
print "$external_page";

Save the file as anything.cgi and change the url above to whatever place your header resides. Upload it to your cgi-bin directory. Change permission of the file and you are ready to go.

Call this cgi file through SSI tag and add that tag in your search result page or wherever you want this file to be displayes. That's it

Hope this helps

Best Regs
JackofNone