|
Posted by Flaming Corncob on 08/20/06 11:15
In article <34fef$44e80669$8259c69c$18973@news2.tudelft.nl>,
"Rik" <luiheidsgoeroe@hotmail.com> wrote:
> Flaming Corncob wrote:
> > In article <44e794d7$0$47828$dbd41001@news.wanadoo.nl>,
> > Juliette <jrf_no_spam@jokeaday.net> wrote:
> >
> >> Flaming Corncob wrote:
> >>> In article <44e75e66$0$66091$dbd4d001@news.wanadoo.nl>,
> >>> Juliette <jrf_no_spam@jokeaday.net> wrote:
> >>>
> >>>> Flaming Corncob wrote:
> >>>>> Using $_SERVER['HTTP_REFERER'], you might get (for example)
> >>>>> http://widgets.com/test/test_new.php?page=2. Is there a way to
> >>>>> extract the "widgets.com/test/test_new.php" portion of it and
> >>>>> store it in a string?
> >>>>>
> >>>>> Thanks much.
> >>>>
> >>>> Have a look at: http://www.php.net/parse-url
> >>>
> >>> Yep, saw that after the fact. Unfortunately ended up with another
> >>> problem. Sometimes the url comes through as blank. Nadda. Nothing.
> >>
> >> That is not a 'problem', but a feature.
> >> Think real world: someone might have bookmarked the page. No
> referrer
> >> will be send then.
> >> Also, the referrer can quite easily be spoofed or removed by a
> >> semi-experienced web-user.
> >> Never make your code dependant on it.
> >>
> >> Have a look at the documentation of the $_SERVER array and the user
> >> comments.
> >
> > So there's no real way to force a page to check for a certain
> > condition
> > and reroute itself to itself to set a page for example? ... I pulled
> > it
> > off by having one single variable used to equal one thing and if
> it's
> > not it assumes the user is visiting the site from somewhere other
> than
> > in the site itself.. if that happens it sets the key variable to
> what
> > it expects and reroutes back to itself passing the key in the url. I
> > just hoped there was a better way of doing it.
>
> Is soons a very lot like a session? What exactly are you planning to
> use it for?
>
> Grtz,
I use it in general. I usually code an index page that handles
everything, and it needs a way of defaulting to the home page... and
last night I discovered another nice toy. isset().
Navigation:
[Reply to this message]
|