Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

the url as seen by the user in the navigation bar on top of explore in a variable
Is it possible to store the URL as seen in the navigation bar
e.g.
$page = ??

So that I can do a test and decide which page to load in which frame.

E.g. if URL is www.main1.com

then the code would know what pages to load, relevant to main1

if the URL is a parked domain associated to the same space, e.g.
www.main2.com

the code could then load different pages in the frameset



Report this thread to moderator Post Follow-up to this message
Old Post
Peter Van Hove
04-21-05 08:56 PM


Re: the url as seen by the user in the navigation bar on top of explore in a variable
PS. I can do it with javascript :

page = (self.location.href =="http://main1.com/index.htm") ?
"main1subpage.htm" :
"main2subpage.htm";

But would like to use PHP as people out there may have java disabled.

-------------------------------------------------------
"Peter Van Hove" <Will_Bounce_So_Use_My_First_Name@Smart-Projects.net> wrote
in message news:UoM9e.70297$3Q7.4891779@phobos.telenet-ops.be...
>
> Is it possible to store the URL as seen in the navigation bar
> e.g.
> $page = ??
>
> So that I can do a test and decide which page to load in which frame.
>
> E.g. if URL is www.main1.com
>
> then the code would know what pages to load, relevant to main1
>
> if the URL is a parked domain associated to the same space, e.g.
> www.main2.com
>
> the code could then load different pages in the frameset
>



Report this thread to moderator Post Follow-up to this message
Old Post
Peter Van Hove
04-21-05 08:56 PM


Re: the url as seen by the user in the navigation bar on top of explore in a variable
Peter Van Hove wrote:

>
> But would like to use PHP as people out there may have java disabled.
>

Java != javascript

> -------------------------------------------------------
> "Peter Van Hove" <Will_Bounce_So_Use_My_First_Name@Smart-Projects.net>
> wrote in message news:UoM9e.70297$3Q7.4891779@phobos.telenet-ops.be... 

try

$url=strlen($_SERVER['SSL_CIPHER']) ? 'http' : 'https';
$url.='//' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];

C.

Report this thread to moderator Post Follow-up to this message
Old Post
Colin McKinnon
04-21-05 08:56 PM


Re: the url as seen by the user in the navigation bar on top of explore in a variable
Nice.
It seems to identify https instead of http but the rest looks ok.

-------------------------------------------------------
"Colin McKinnon" <colin.deletethis@andthis.mms3.com> wrote in message
news:d48867$gpr$1$8300dec7@news.demon.co.uk...
> Peter Van Hove wrote:
> 
>
> Java != javascript
> 
>
> try
>
> $url=strlen($_SERVER['SSL_CIPHER']) ? 'http' : 'https';
> $url.='//' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
>
> C.



Report this thread to moderator Post Follow-up to this message
Old Post
Peter Van Hove
04-21-05 08:56 PM


Re: the url as seen by the user in the navigation bar on top of explore in a variable
Peter Van Hove wrote:

> Nice.
> It seems to identify https instead of http but the rest looks ok.
>

debugging costs extra.

C.

Report this thread to moderator Post Follow-up to this message
Old Post
Colin McKinnon
04-21-05 08:56 PM


Re: the url as seen by the user in the navigation bar on top of explore in a variable
> debugging costs extra.

In that case ...
The second line needs a colon (just before the two slashes) ;-)
> $url.='://'   .....



Report this thread to moderator Post Follow-up to this message
Old Post
Peter Van Hove
04-21-05 08:56 PM


Re: the url as seen by the user in the navigation bar on top of explore in a variable
PS. I can do it with javascript :

page = (self.location.href =="http://main1.com/index.htm") ?
"main1subpage.htm" :
"main2subpage.htm";

But would like to use PHP as people out there may have java disabled.

-------------------------------------------------------
"Peter Van Hove" <Will_Bounce_So_Use_My_First_Name@Smart-Projects.net> wrote
in message news:UoM9e.70297$3Q7.4891779@phobos.telenet-ops.be...
>
> Is it possible to store the URL as seen in the navigation bar
> e.g.
> $page = ??
>
> So that I can do a test and decide which page to load in which frame.
>
> E.g. if URL is www.main1.com
>
> then the code would know what pages to load, relevant to main1
>
> if the URL is a parked domain associated to the same space, e.g.
> www.main2.com
>
> the code could then load different pages in the frameset
>



Report this thread to moderator Post Follow-up to this message
Old Post
Peter Van Hove
04-23-05 01:55 PM


Re: the url as seen by the user in the navigation bar on top of explore in a variable
Nice.
It seems to identify https instead of http but the rest looks ok.

-------------------------------------------------------
"Colin McKinnon" <colin.deletethis@andthis.mms3.com> wrote in message
news:d48867$gpr$1$8300dec7@news.demon.co.uk...
> Peter Van Hove wrote:
> 
>
> Java != javascript
> 
>
> try
>
> $url=strlen($_SERVER['SSL_CIPHER']) ? 'http' : 'https';
> $url.='//' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
>
> C.



Report this thread to moderator Post Follow-up to this message
Old Post
Peter Van Hove
04-23-05 01:55 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

PHP Language archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 07:23 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.