Enjoy unlimited access to all forum features for FREE! Optional upgrade available for extra perks.
Daily Diamond

NetWork Sites Script

Status
Not open for further replies.

MediaHound

Former DNF Admin
Legacy Exclusive Member
Joined
Feb 25, 2004
Messages
4,159
Reaction score
8
do this in .htaccess

you need a server wide header file
 

BLazeD

Selling
Legacy Exclusive Member
Joined
Apr 17, 2004
Messages
2,894
Reaction score
12
How exactly? I am looking for the code
 

MediaHound

Former DNF Admin
Legacy Exclusive Member
Joined
Feb 25, 2004
Messages
4,159
Reaction score
8
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
 

BLazeD

Selling
Legacy Exclusive Member
Joined
Apr 17, 2004
Messages
2,894
Reaction score
12
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?
 

clasione

DNForum.com Regular
Legacy Exclusive Member
Joined
May 5, 2004
Messages
1,110
Reaction score
94
I cannot believe the size of that netwok at webhostingtalk.... I never even really noticed those drop downs on top...
 

MediaHound

Former DNF Admin
Legacy Exclusive Member
Joined
Feb 25, 2004
Messages
4,159
Reaction score
8
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.
 

BLazeD

Selling
Legacy Exclusive Member
Joined
Apr 17, 2004
Messages
2,894
Reaction score
12
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
 

labrocca

Omniscient
Legacy Exclusive Member
Joined
Mar 14, 2004
Messages
1,452
Reaction score
3
How about a php version?
:)

I have perl disabled on most of my sites.
 

BLazeD

Selling
Legacy Exclusive Member
Joined
Apr 17, 2004
Messages
2,894
Reaction score
12
^^ you have a php version?
 

Zion

DNF Member
Legacy Exclusive Member
Joined
Oct 26, 2004
Messages
449
Reaction score
0
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.

The Rule #1

Do not insult any other member. Be polite and do business. Thank you!

Members Online

Sedo - it.com Premiums

IT.com

Premium Members

Premium Members

MariaBuy

Our Mods' Businesses

UrlPick.com

*the exceptional businesses of our esteemed moderators

Top Bottom