Alright... I'm starting from scratch here, any and all help would be appreciative.... I thank everyone who has helped try to solve this problem, but absolutely nothing works at all....

I have a CGI script that I wrote for a friend that would turn a query string URL into a framed page so that http://www.www.com/domain.cgi?http:/...ramedsite.com, that the framessite.com would appear in a frames page with an ad above it sort of like AskJeeves.Com and Hotmail.com do. But this dosen't have the option of removing itself (If anybody wants to be able to help me there, I'd really appreciate that too...). But with the original script if you were to just call up the CGI file by itself it would bring up a blank page and the ad frame.

But what I want it to be able to do is if nothing is called in the query string there will not be a framed site, but a different page called, but I have a twist here in what I was trying earlier... I want to be able to use my header and footer script (It's in a post elsewhere on this site) on that missing file called page...

I've tryed a lot here, and others have helped to but I keep running into problems, especially with endHTML commands....

If you can help I'd really appreciate it...
Dan

This is the ORIGINAL SCRIPT no modifications....

SCRIPT -
-------------

#!/usr/bin/perl
BEGIN {
open (STDERR, ">>/home/public_html/cgi-bin/error1.txt");
}
#######################################################
$version = "1.0";
$size = "61";
$title = "Website";
$page = "http://www.www.com/frame.shtml";
#######################################################
$URL = "$ENV{'QUERY_STRING'}";
print "Content-type: text/html\n\n";
print <<EndHTML;
<html>
<head><title>$title</title></head>
<noframes>
<body>
Your browser doesn't support frames. Please click <a href="$URL">here</a> to be redirected to the new page.
</body>
</noframes>

<frameset framespacing="0" rows="$size,*" frameborder="0" noresize>
<frame name="top" src="$page" target="top" scrolling="no">
<frame name="main" src="$URL" target="main">
</frameset>
</html>

EndHTML
;


Below is the new header that will be needed for the script though... Notice that the $missing variable (default) does not have a file extension, that is meant to be....

NEW HEADER -
-------------

#######################################################
$version = "1.0";
$size = "61";
$title = "| Web Site - Affiliate |";
$page = "http://www.www.com/html/frame.shtml";
$missingfilesdir = "/home/public_html/error";
$textfilesdir = "/home/public_html/text";
$basedir = "/home/public_html/ads";
$header = "header.txt";
$footer = "footer.txt";
$missing = "default";
#######################################################


I'm in dire need of any and help...... Please help...