NYCPHP Meetup

NYPHP.org

[nycphp-talk] Returning users from whiniest they came

Kristina Anderson ka at kacomputerconsulting.com
Fri Jul 11 09:18:37 EDT 2008


Full text of what I was trying to post, below:

Hi Paul,

As someone pointed out earlier this week, unless your app is set up so 
that the only entry point to it is a link from another URL, in most 
cases your user's entry point into your app would be typing the address 
directly, in which case there would not be an HTTP_REFERRER.

HTTP_REFERRER's most common use is to track marketing and sales data 
coming from links on affiliates' websites, in emails, and etc. and 
records the URL of the referring site.    So you could determine, for 
instance, which one of your 10 affiliate sites sends the most customers 
(and how many each sends), or what percentage of persons you send an 
email to actually click on your sales link.

In your case, if your concern is that you want to ensure that users 
exit your app, I feel that programmatically closing the browser window 
would not only accomplish that but be best for security reasons.  Or, 
in the alternative, but way more annoying to users, you can use headers 
to send them outside your app to another URL.

If you programmatically send them back to the logon page, the back 
button won't then send them to the website they may have previously 
been on, but back to a previous page in your own app.

-- Kristina

> Hi Chris ,
> 
> I genuinely believe that I have a misunderstanding of what the 
HTTP_REFERER 
> is all about. I was trying to grab the address just before the user 
entered 
> "my" application.
> 
> In my INDEX.PHP,  I used an extra script named LOGIN.PHP, where the 
> HTTP_REFERER was captured.  Then in turn LOGIN.PHP called another 
script 
> named LOGON.PHP which picked up the HTTP_REFERER information. which 
in my 
> case is the url name of  my INDEX.PHP, Which of course pointed the 
way into 
> the application in the first place.
> 
> Within the application HTTP_REFERER works just fine. I can see its 
potential 
> and some importance possible uses within applications.
> 
> I am guessing the way around my problem is to forget the use of 
HTTP_REFERER 
> and just put the user back to the login page and let the user press 
the back 
> button to let themselves out, or is there a more elegant way to do 
what I 
> want??
> 
> Cheers - Paul
> 
> ----- Original Message ----- 
> From: "csnyder" <chsnyder at gmail.com>
> To: "NYPHP Talk" <talk at lists.nyphp.org>
> Sent: Wednesday, July 09, 2008 8:01 PM
> Subject: Re: [nycphp-talk] Returning users from whiniest they came
> 
> 
> > On Wed, Jul 9, 2008 at 2:39 PM, PaulCheung 
<paulcheung at tiscali.co.uk>
> > wrote:
> >> I have tried running the HTTP_REFERER using the one liner below and
> >> nothing
> >> happens
> >>
> >> <?php
> >>   echo $_SERVER['HTTP_REFERER'];
> >> ?>
> >>
> >> I cannot see why it should not work on my hosted Linux website, as 
it
> >> works
> >> on this site
> >>
> >> http://unix.cms.gre.ac.uk/code/php/examples/http_referer.php
> >>
> >> Paul
> >
> >
> > You are using a link on another page to get to your referer test, 
right?
> >
> > Try print_r( $_SERVER ) to see if the $_SERVER superglobal is being
> > set in the first place.
> > _______________________________________________
> > New York PHP Community Talk Mailing List
> > http://lists.nyphp.org/mailman/listinfo/talk
> >
> > NYPHPCon 2006 Presentations Online
> > http://www.nyphpcon.com
> >
> > Show Your Participation in New York PHP
> > http://www.nyphp.org/show_participation.php
> 
> _______________________________________________
> New York PHP Community Talk Mailing List
> http://lists.nyphp.org/mailman/listinfo/talk
> 
> NYPHPCon 2006 Presentations Online
> http://www.nyphpcon.com
> 
> Show Your Participation in New York PHP
> http://www.nyphp.org/show_participation.php
> 
> 

-------------------
Kristina D. H. Anderson
Senior Application Developer/Consultant
"Building a Better Tomorrow, One Line of Code at a Time"
646-247-4987




More information about the talk mailing list