RE: [PHP] Re: $HTTP_REFERER < 10

2001-07-12 Thread scott [gts]

i know that i am always interested to see code posted
on this list... even if i cannot personally use the code,
i'm always curious to see how people write code.

> -Original Message-
> From: Inércia Sensorial [mailto:[EMAIL PROTECTED]]
> Subject: Re: [PHP] Re: $HTTP_REFERER < 10
>
>   Thank you Scott for the various ideas. I am preventing an eventual 'no
> referer' situation with a default url provided by who opens an account.
>
>   I am getting (and trying to give :)) help on this list, so I will ask
> first before doing... Is it normal to announce personal projects here? This
> one is an open source referer system, where you can build a website to offer
> 'recommend' services to other people.
>
>   When is it ready, can I post here? And maybe for some other projects too
> ;-)


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Re: $HTTP_REFERER < 10

2001-07-12 Thread Inércia Sensorial

  Thank you Scott for the various ideas. I am preventing an eventual 'no
referer' situation with a default url provided by who opens an account.

  I am getting (and trying to give :)) help on this list, so I will ask
first before doing... Is it normal to announce personal projects here? This
one is an open source referer system, where you can build a website to offer
'recommend' services to other people.

  When is it ready, can I post here? And maybe for some other projects too
;-)

--

  Julio Nobrega.

One and One and One is Three
"Scott" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> a partial suggestion would be to try an fopen() on the
> HTTP_REFERER if it was a static document like .html or .txt
>
> but if someone is being redirected from a CGI script or
> dyanmic page of any sort, it'll be virtually impossible
> to find out exactly where they came from and if that
> page is valid or not.
>
> or you could try to determine the host name of HTTP_REFERER,
> then perform an nslookup of that hostname to determine if
> it exists and is valid.
>
> but both of those will probably give your script a
> rather nasty performance hit while still not being
> 100% reliable.
>
> you can find out if the referrer *looks* OK, but there's
> virtually no way you can find out 100% if the referrer
> is actually where the user came from, and if it's an
> actual page somewhere out there on the internet...



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Re: $HTTP_REFERER < 10

2001-07-12 Thread scott [gts]

a partial suggestion would be to try an fopen() on the
HTTP_REFERER if it was a static document like .html or .txt

but if someone is being redirected from a CGI script or
dyanmic page of any sort, it'll be virtually impossible
to find out exactly where they came from and if that
page is valid or not.

or you could try to determine the host name of HTTP_REFERER,
then perform an nslookup of that hostname to determine if
it exists and is valid.

but both of those will probably give your script a
rather nasty performance hit while still not being
100% reliable.

you can find out if the referrer *looks* OK, but there's
virtually no way you can find out 100% if the referrer
is actually where the user came from, and if it's an
actual page somewhere out there on the internet...

> -Original Message-
> From: Inércia Sensorial [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, July 12, 2001 10:01 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Re: $HTTP_REFERER < 10
>
>
>   That's also something worth to be done, but first I need to know some
> possible variations of $HTTP_REFERER...
>
>   I never saw one, when coming from another domain, without the
> 'http://'´part, so that's a regex to check, but I may be wrong...
>
> --
>
>   Julio Nobrega.
>
> One and One and One is Three
> "Elias" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > Maybe what you say about smallest refeerer length is true...
> > but why don't you check via regexps the validity of the REFEERER format
> only
> > if it was set?
> >
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]