/    Sign up×
Community /Pin to ProfileBookmark

Create frames (header) automatically

Ok, let me try to explain this……..
I have an entertainment site and I don’t want to host EVERYTHING, but I still want to get advertising in, so you’d wanna use a frame, that’s what most people do anyway. however I don’t want to make a new frames page for each page I’m linking to…

So how can I make it so that when somebody clicks a link to a site other than mine it automatically includes that frame at the top of the page….. thanks!

to post a comment
PHP

1 Comments(s)

Copy linkTweet thisAlerts:
@cyber1Feb 04.2005 — Is this what you are looking for.

It's a simple frameset in a php script.

-Bill

[code=php]<?php

if($_GET['test_frame1']){
print <<<HTML
<html>
<head>
<title>Untitled Test</title>
<meta name="generator" content="BBEdit">
</head>
<body>
test_frame1 FRAME1
[kode]HTML or any code here[/kode]
</body>
</html>
HTML;
}
elseif($_GET['test_frame2']){

print <<<HTML
<html>
<head>
<title>Untitled Test</title>
<meta name="generator" content="BBEdit">
</head>
<body>
test_frame2 FRAME2
[kode]HTML or any code here[/kode]
</body>
</html>
HTML;

}
else{
$frame_title ="Frames";

print <<<HTML
<html><head>
<title>frame_title</title>
</head>
<body bgcolor="#FFFFFF">
<frameset rows="250,500">
<frame name="top" src="$PHP_SELF?test_frame1=1" frameborder="1" scrolling="1">
<frame name="bottom" src="$PHP_SELF?test_frame2=1" scrolling="1">
</frame>
</frame>
</frameset>
</frameset>
</body>
</html>
HTML;
}
?>
[/code]
×

Success!

Help @sheekorgeek_com spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.21,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...