• Welcome to DNForum.com - Domain Investor Forum, Free Domain Marketplace and a community for 45+ domain pros
    If you are new to domains and looking to buy, sell and learn about domains then you have come to the right place. DNForum is the oldest global domain name community on the internet and continues to grow every day. There are over 45,000 domainers on DNForum doing everything from buying domains, selling domains, using our free in-house built tools, learning about domains and discussing domains. Take a minute and Register.

NetWork Sites Script

Status
Not open for further replies.
do this in .htaccess

you need a server wide header file
 
How exactly? I am looking for the code
 
In .htaccess:
PHP:
Action add-header /cgi-bin/hfr/hfr.pl
AddHandler add-header .html .htm .shtml


In hfr.pl:
PHP:
#!/usr/bin/perl

#
# Simple headers/footers rotater for Apache
#
# Copyright (c) 2002 D.Pokataev. Freeware
#

#    This program is free software; you can redistribute it and/or modify
#    it under the terms of the GNU General Public License as published by
#    the Free Software Foundation; either version 2 of the License, or
#    (at your option) any later version.
#
#    This program is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU General Public License for more details.
#
#    You should have received a copy of the GNU General Public License
#    along with this program; if not, write to the Free Software
#    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

srand();
print "Content-Type: text/html\n\n";
if (-d "./headers") {
  @a = glob "./headers/*.htm";
  if (@a) {
    push @f, $a[rand(@a)];
  }
}
push @f, "$ENV{'PATH_TRANSLATED'}";
if (-d "./footers") {
  @a = glob "./footers/*.htm";
  if (@a) {
    push @f, $a[rand(@a)];
  }
}
foreach $i (@f) {
  &pf("$i");
}
sub pf($) {
  open (PF,"<$_[0]");
  while (<PF>) {print};
  close(PF);
}

Readme:
# Download License. If you do not agree to license, stop installation
# Save file hfr.pl to your hard drive
# Correct first script line if path to Perl on your server is not "/usr/bin/perl"
# Create directory /cgi-bin/hfr/ on your server
# Upload file hfr.pl to /cgi-bin/hfr directory on ASCII mode
# Change file hfr.pl mode to 755
# Create directory /cgi-bin/hfr/headers on your server (if you will use headers)
# Create directory /cgi-bin/hfr/footers on your server (if you will use footers)
# Create separate files with headers. You can use any names you want, but extension must be .htm
# Create separate files with footers. You can use any names you want, but extension must be .htm
# Upload headers files to /cgi-bin/hfr/headers on your server
# Upload footers files to /cgi-bin/hfr/footers on your server
# Go to web directory where you want to add headers/footers to html pages. Script will work for this directory and all subdirectories
# Add to .htaccess file two lines:
Action add-header /cgi-bin/hfr/hfr.pl
AddHandler add-header .html .htm .shtml
If .htaccess file doesn't exist, just upload .htaccess with two lines above
# If you use other extensions for html files, add them to "AddHandler" line
# Enjoy :)

ask and you shall receive ;)
hope this helps
 
Thanks man, will check this out and let you know how it goes

Aight, the code for the header file would be good. I dont know about drop downs.

Simply want:

example:

<center>BLazeD Network</center> <align=right>Drop Down Box</align>

How do you change the background image etc?
 
Blazed,
Just start viewing the source of pages you like.
Or invest in a good html editor.

I can show you how but I cant hold your hand!

Keep us posted on how it goes.
 
Mon May 23 03:56:28 2005] [error] [client 66.245.242.60] Premature end of script headers: /home/xxxxx/public_html/cgi-bin/hfr/hfr.pl
[Mon May 23 03:56:28 2005] [error] exec of /home/xxxxx/public_html/cgi-bin/hfr/hfr.pl failed
 
How about a php version?
:-)

I have perl disabled on most of my sites.
 
^^ you have a php version?
 
clasione said:
I cannot believe the size of that netwok at webhostingtalk.... I never even really noticed those drop downs on top...

$$$$$$$$$$$$$$
 
Status
Not open for further replies.
Back
Top Bottom