HTML Tutorial


 Forum HomeForum Home   FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
RegisterRegister - Not registered yet? Got something to say? Join HTML Code Tutorial!
Calling a specific page in an iframe based on parent url
Post new topic   Reply to topic    HTML Help Forum Index -> PHP
View previous topic :: View next topic  
Author Message
grepico



Joined: 10 Apr 2007
Posts: 2

PostPosted: Tue Apr 10, 2007 9:19 am     Calling a specific page in an iframe based on parent url Reply with quote

Here's my situation. We have a GuilPortal site for our WoW guild and I am extremely limited on what I can do on the site. My focus is on the banner, they allow me to put custom html in the banner area, but no PHP. What I did was put iframe code in the banner area that called a php page from my personal site.

Banner Code:

<iframe FRAMEBORDER="0" src="http://www.grepico.com/ffweb/titlevid/ffvid.php" width="925" height="230"></iframe>

Here is the code in that php page:

<?php
//Gets the referer URL
$mdk = getenv("HTTP_REFERER");
if ($mdk=="http://forsakensfinest.guildportal.com/Guild.aspx?GuildID=40498&TabID=358212")
include("http://www.grepico.com/ffweb/titlevid/fullvid.html");
else if ($mdk=="http://www.guildportal.com/Guild.aspx?GuildID=40498&TabID=358212")
include("http://www.grepico.com/ffweb/titlevid/fullvid.html");
else if ($mdk=="http://guildportal.com/Guild.aspx?GuildID=40498&TabID=358212")
include("http://www.grepico.com/ffweb/titlevid/fullvid.html");
else
include("http://www.grepico.com/ffweb/titlevid/titlevid.html");
?>

The urls fullvid.html and titlevid.html are basically two versions of a flash video. What I'm trying to do is make it so if the user is on the main page of the site they get the full video, if they are on any other page they get the shortened vid with no sound. This worked fine until a few days ago and with some research I have discovered that HTTP_REFERER is terribly unreliable.

In short, what I need to do is get the referring or parent url into a variable so my php will know which vid to show.

Thanks
SteveH



Joined: 11 Apr 2007
Posts: 208

PostPosted: Wed Apr 11, 2007 3:00 pm     Reply with quote

Do you have any control over changing the link code on the referring URLs, or are you stuck with the links as the appear?
Display posts from previous:   
Post new topic   Reply to topic    HTML Help Forum Index -> PHP All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
HTML Help Archive
Powered by phpBB © 2001, 2005 phpBB Group
HTML Help topic RSS feed 

 
HOSTING / DESIGN
MAKE MONEY

Home
  |   Tutorials   |   Forum   |   Quick List   |   Link Directory   |   About
Copyright ©1997-2002 Idocs and ©2002-2007 HTML Code Tutorial