RE: [PHP] Verify script location...

2002-03-05 Thread Demitrious S. Kelly
http://www.php.net/manual/en/language.variables.predefined.php $HTTP_HOST Contents of the Host: header from the current request, if there is one. $HTTP_REFERER The address of the page (if any) which referred the browser to the current page. This is set by the user's browser; not all browsers

RE: [PHP] Verify script location...

2002-03-05 Thread Kevin Stone
It's not possible to include() a remote file so there may be little point to this. However maybe you want to keep users on your system from including the file in their scripts. In that case I suppose you could set $PHP_SELF (of the main script) to a temporary variable for checking in the

Re: [PHP] Verify script location...

2002-03-05 Thread jas
Ok I think I am a little confused... with regards to include() and require(), if I knew the name of a file on say brownstone.com and that file was called database.inc and it contained all the connection settings for brownstone.com's database. Say I run a website called hacktheplanet.com and I

Re: [PHP] Verify script location...

2002-03-05 Thread jas
Essentially what I would like to do is to prevent this kind of thing from happening to my own website, just to clear up my example. =) Jas Jas [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]; Ok I think I am a little confused... with regards to include() and require(), if I knew the

Re: [PHP] Verify script location...

2002-03-05 Thread jas
A Mr. Sheets gave me this snippet to use... if ($_SERVER[SERVER_ADDR] != 'ip address of server') { echo You are attempted to use this file from an unauthorized host exit; } Jas [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]; Essentially what I would like to do is to prevent this kind

Re: [PHP] Verify script location...

2002-03-05 Thread Erik Price
On Tuesday, March 5, 2002, at 01:57 PM, Kevin Stone wrote: It's not possible to include() a remote file so there may be little point to this. However maybe you want to keep users on your system from including the file in their scripts. In that case I suppose you could set $PHP_SELF (of