Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #2482 > unrolled thread

Restricting access to a website

Started byGraham Hobbs <ghobbs@cdpwise.net>
First post2011-07-10 22:01 -0400
Last post2011-07-14 08:55 -0400
Articles 20 on this page of 36 — 9 participants

Back to article view | Back to comp.lang.php


Contents

  Restricting access to a website Graham Hobbs <ghobbs@cdpwise.net> - 2011-07-10 22:01 -0400
    Re: Restricting access to a website Jerry Stuckle <jstucklex@attglobal.net> - 2011-07-10 22:21 -0400
      Re: Restricting access to a website richard <member@newsguy.com> - 2011-07-10 22:49 -0400
        Re: Restricting access to a website Jerry Stuckle <jstucklex@attglobal.net> - 2011-07-11 06:38 -0400
      Re: Restricting access to a website Graham Hobbs <ghobbs@cdpwise.net> - 2011-07-11 16:08 -0400
        Re: Restricting access to a website Jerry Stuckle <jstucklex@attglobal.net> - 2011-07-11 17:29 -0400
          Re: Restricting access to a website Graham Hobbs <ghobbs@cdpwise.net> - 2011-07-11 18:21 -0400
            Re: Restricting access to a website Michael Fesser <netizen@gmx.de> - 2011-07-12 16:27 +0200
              Re: Restricting access to a website Graham Hobbs <ghobbs@cdpwise.net> - 2011-07-12 11:23 -0400
              Re: Restricting access to a website Chuck Anderson <cycletourist@invalid.invalid> - 2011-07-12 10:33 -0600
                Re: Restricting access to a website Graham Hobbs <ghobbs@cdpwise.net> - 2011-07-12 13:04 -0400
                Re: Restricting access to a website Jerry Stuckle <jstucklex@attglobal.net> - 2011-07-12 15:13 -0400
                  Re: Restricting access to a website Chuck Anderson <cycletourist@invalid.invalid> - 2011-07-12 15:19 -0600
                    Re: Restricting access to a website Jerry Stuckle <jstucklex@attglobal.net> - 2011-07-12 19:35 -0400
          Re: Restricting access to a website Chuck Anderson <cycletourist@invalid.invalid> - 2011-07-11 17:24 -0600
            Re: Restricting access to a website Jerry Stuckle <jstucklex@attglobal.net> - 2011-07-11 20:38 -0400
              Re: Restricting access to a website Luuk <Luuk@invalid.lan> - 2011-07-13 21:13 +0200
                Re: Restricting access to a website The Natural Philosopher <tnp@invalid.invalid> - 2011-07-13 20:43 +0100
                  Re: Restricting access to a website Luuk <Luuk@invalid.lan> - 2011-07-13 21:53 +0200
                    Re: Restricting access to a website The Natural Philosopher <tnp@invalid.invalid> - 2011-07-14 00:17 +0100
                    Re: Restricting access to a website Jerry Stuckle <jstucklex@attglobal.net> - 2011-07-14 00:12 -0400
                  Re: Restricting access to a website Michael Fesser <netizen@gmx.de> - 2011-07-13 21:56 +0200
                    Re: Restricting access to a website The Natural Philosopher <tnp@invalid.invalid> - 2011-07-14 00:53 +0100
                Re: Restricting access to a website Michael Fesser <netizen@gmx.de> - 2011-07-13 21:49 +0200
                  Re: Restricting access to a website Luuk <Luuk@invalid.lan> - 2011-07-13 22:12 +0200
                    Re: Restricting access to a website Michael Fesser <netizen@gmx.de> - 2011-07-14 00:13 +0200
                      Re: Restricting access to a website The Natural Philosopher <tnp@invalid.invalid> - 2011-07-14 00:54 +0100
                    Re: Restricting access to a website Jerry Stuckle <jstucklex@attglobal.net> - 2011-07-14 00:14 -0400
                Re: Restricting access to a website Jerry Stuckle <jstucklex@attglobal.net> - 2011-07-14 00:09 -0400
        Re: Restricting access to a website The Natural Philosopher <tnp@invalid.invalid> - 2011-07-12 00:43 +0100
        Re: Restricting access to a website Graham Hobbs <ghobbs@cdpwise.net> - 2011-07-13 14:44 -0400
          Re: Restricting access to a website Graham Hobbs <ghobbs@cdpwise.net> - 2011-07-13 21:05 -0400
    Re: Restricting access to a website The Natural Philosopher <tnp@invalid.invalid> - 2011-07-11 08:17 +0100
    Re: Restricting access to a website Man-wai Chang <toylet.toylet@gmail.com> - 2011-07-13 00:32 +0800
    Re: Restricting access to a website Man-wai Chang <toylet.toylet@gmail.com> - 2011-07-13 00:34 +0800
    Re: Restricting access to a website Bill B <me@privacy.net> - 2011-07-14 08:55 -0400

Page 1 of 2  [1] 2  Next page →


#2482 — Restricting access to a website

FromGraham Hobbs <ghobbs@cdpwise.net>
Date2011-07-10 22:01 -0400
SubjectRestricting access to a website
Message-ID<rilk175ofv1p1b4uqtmaibfkmgg8otk8vl@4ax.com>
Hello,

I 'very laboriously' coded my index.php (close to novice level), for
my website and it is up and running. It's not public yet and needs to
stay that way. I need to give the address to two people who will help
with my product's development .. but they could reveal the address
anywhere, inadvertently or otherwise.

If, for example, my website is www .lahdedah. com, I want to allow
full access to these two people (and me:-)) .. others would get a
'Sorry, not yet available' screen. I envision hard coding their home
address's into my index.php?? Am not interested in any additional
typing by these three.

Hope I've been clear. Is this feasible, easy/hard/unusual?
Please, thanks
Graham

[toc] | [next] | [standalone]


#2483

FromJerry Stuckle <jstucklex@attglobal.net>
Date2011-07-10 22:21 -0400
Message-ID<ivdmns$qg$1@dont-email.me>
In reply to#2482
On 7/10/2011 10:01 PM, Graham Hobbs wrote:
> Hello,
>
> I 'very laboriously' coded my index.php (close to novice level), for
> my website and it is up and running. It's not public yet and needs to
> stay that way. I need to give the address to two people who will help
> with my product's development .. but they could reveal the address
> anywhere, inadvertently or otherwise.
>
> If, for example, my website is www .lahdedah. com, I want to allow
> full access to these two people (and me:-)) .. others would get a
> 'Sorry, not yet available' screen. I envision hard coding their home
> address's into my index.php?? Am not interested in any additional
> typing by these three.
>
> Hope I've been clear. Is this feasible, easy/hard/unusual?
> Please, thanks
> Graham

There are any number of ways to do it, none of which require PHP or any 
other server-side language.  Try alt.apache.configuration (assuming, of 
course, you're using Apache).

Also, unless you are David Small of Small Expressions, you shouldn't be 
using his domain name in an example.  Use www.example.com, which is 
reserved for just such a purpose.

-- 
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

[toc] | [prev] | [next] | [standalone]


#2484

Fromrichard <member@newsguy.com>
Date2011-07-10 22:49 -0400
Message-ID<1nmmufycqqjb7.dlg@evanplatt.sux>
In reply to#2483
On Sun, 10 Jul 2011 22:21:41 -0400, Jerry Stuckle wrote:

> On 7/10/2011 10:01 PM, Graham Hobbs wrote:
>> Hello,
>>
>> I 'very laboriously' coded my index.php (close to novice level), for
>> my website and it is up and running. It's not public yet and needs to
>> stay that way. I need to give the address to two people who will help
>> with my product's development .. but they could reveal the address
>> anywhere, inadvertently or otherwise.
>>
>> If, for example, my website is www .lahdedah. com, I want to allow
>> full access to these two people (and me:-)) .. others would get a
>> 'Sorry, not yet available' screen. I envision hard coding their home
>> address's into my index.php?? Am not interested in any additional
>> typing by these three.
>>
>> Hope I've been clear. Is this feasible, easy/hard/unusual?
>> Please, thanks
>> Graham
> 
> There are any number of ways to do it, none of which require PHP or any 
> other server-side language.  Try alt.apache.configuration (assuming, of 
> course, you're using Apache).
> 
> Also, unless you are David Small of Small Expressions, you shouldn't be 
> using his domain name in an example.  Use www.example.com, which is 
> reserved for just such a purpose.

You should look at my registration.
Brent Oxley doesn't own my domain.
I just never bothered to change the technical info.
I figure that since that is where the domain is registered at, then that
info satisfies the ICANN rules.

If I need to be contacted, the registrar can contact me directly any time.

[toc] | [prev] | [next] | [standalone]


#2490

FromJerry Stuckle <jstucklex@attglobal.net>
Date2011-07-11 06:38 -0400
Message-ID<ivejqa$edl$1@dont-email.me>
In reply to#2484
On 7/10/2011 10:49 PM, richard wrote:
> On Sun, 10 Jul 2011 22:21:41 -0400, Jerry Stuckle wrote:
>
>> On 7/10/2011 10:01 PM, Graham Hobbs wrote:
>>> Hello,
>>>
>>> I 'very laboriously' coded my index.php (close to novice level), for
>>> my website and it is up and running. It's not public yet and needs to
>>> stay that way. I need to give the address to two people who will help
>>> with my product's development .. but they could reveal the address
>>> anywhere, inadvertently or otherwise.
>>>
>>> If, for example, my website is www .lahdedah. com, I want to allow
>>> full access to these two people (and me:-)) .. others would get a
>>> 'Sorry, not yet available' screen. I envision hard coding their home
>>> address's into my index.php?? Am not interested in any additional
>>> typing by these three.
>>>
>>> Hope I've been clear. Is this feasible, easy/hard/unusual?
>>> Please, thanks
>>> Graham
>>
>> There are any number of ways to do it, none of which require PHP or any
>> other server-side language.  Try alt.apache.configuration (assuming, of
>> course, you're using Apache).
>>
>> Also, unless you are David Small of Small Expressions, you shouldn't be
>> using his domain name in an example.  Use www.example.com, which is
>> reserved for just such a purpose.
>
> You should look at my registration.
> Brent Oxley doesn't own my domain.
> I just never bothered to change the technical info.
> I figure that since that is where the domain is registered at, then that
> info satisfies the ICANN rules.
>
> If I need to be contacted, the registrar can contact me directly any time.

Which has absolutely nothing to do with what I said.

-- 
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

[toc] | [prev] | [next] | [standalone]


#2497

FromGraham Hobbs <ghobbs@cdpwise.net>
Date2011-07-11 16:08 -0400
Message-ID<fvlm17528gbqkv7ff3mjrhd94dd4hflrso@4ax.com>
In reply to#2483
On Sun, 10 Jul 2011 22:21:41 -0400, Jerry Stuckle
<jstucklex@attglobal.net> wrote:

>On 7/10/2011 10:01 PM, Graham Hobbs wrote:
>> Hello,
>>
>> I 'very laboriously' coded my index.php (close to novice level), for
>> my website and it is up and running. It's not public yet and needs to
>> stay that way. I need to give the address to two people who will help
>> with my product's development .. but they could reveal the address
>> anywhere, inadvertently or otherwise.
>>
>> If, for example, my website is www .lahdedah. com, I want to allow
>> full access to these two people (and me:-)) .. others would get a
>> 'Sorry, not yet available' screen. I envision hard coding their home
>> address's into my index.php?? Am not interested in any additional
>> typing by these three.
>>
>> Hope I've been clear. Is this feasible, easy/hard/unusual?
>> Please, thanks
>> Graham
>
>There are any number of ways to do it, none of which require PHP or any 
>other server-side language.  Try alt.apache.configuration (assuming, of 
>course, you're using Apache).
>
>Also, unless you are David Small of Small Expressions, you shouldn't be 
>using his domain name in an example.  Use www.example.com, which is 
>reserved for just such a purpose.
---
Jerry, folks, thanks,

Will check into alt.apache.configuration and apologies about lahdedah,
didn't know about example.com.

But I wasn't emphatic enough .. yes I would know their IP addresses so
CAN I hard code them in my index.php? Yes or no would do and a PHP
buzzword I might search on to get started .. I just prefer all my code
in one place.

.. am definitely not interested in extra keying of passwords by my two
associates.

Thanks,
Graham

[toc] | [prev] | [next] | [standalone]


#2499

FromJerry Stuckle <jstucklex@attglobal.net>
Date2011-07-11 17:29 -0400
Message-ID<ivfpv7$hvj$1@dont-email.me>
In reply to#2497
On 7/11/2011 4:08 PM, Graham Hobbs wrote:
> On Sun, 10 Jul 2011 22:21:41 -0400, Jerry Stuckle
> <jstucklex@attglobal.net>  wrote:
>
>> On 7/10/2011 10:01 PM, Graham Hobbs wrote:
>>> Hello,
>>>
>>> I 'very laboriously' coded my index.php (close to novice level), for
>>> my website and it is up and running. It's not public yet and needs to
>>> stay that way. I need to give the address to two people who will help
>>> with my product's development .. but they could reveal the address
>>> anywhere, inadvertently or otherwise.
>>>
>>> If, for example, my website is www .lahdedah. com, I want to allow
>>> full access to these two people (and me:-)) .. others would get a
>>> 'Sorry, not yet available' screen. I envision hard coding their home
>>> address's into my index.php?? Am not interested in any additional
>>> typing by these three.
>>>
>>> Hope I've been clear. Is this feasible, easy/hard/unusual?
>>> Please, thanks
>>> Graham
>>
>> There are any number of ways to do it, none of which require PHP or any
>> other server-side language.  Try alt.apache.configuration (assuming, of
>> course, you're using Apache).
>>
>> Also, unless you are David Small of Small Expressions, you shouldn't be
>> using his domain name in an example.  Use www.example.com, which is
>> reserved for just such a purpose.
> ---
> Jerry, folks, thanks,
>
> Will check into alt.apache.configuration and apologies about lahdedah,
> didn't know about example.com.
>
> But I wasn't emphatic enough .. yes I would know their IP addresses so
> CAN I hard code them in my index.php? Yes or no would do and a PHP
> buzzword I might search on to get started .. I just prefer all my code
> in one place.
>
> .. am definitely not interested in extra keying of passwords by my two
> associates.
>
> Thanks,
> Graham

You definitely need alt.apache.configuration.  No need to do anything to 
your php code.

-- 
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

[toc] | [prev] | [next] | [standalone]


#2501

FromGraham Hobbs <ghobbs@cdpwise.net>
Date2011-07-11 18:21 -0400
Message-ID<5qtm17hecn89sdv8rdn71rnmv9osv3nrmb@4ax.com>
In reply to#2499
On Mon, 11 Jul 2011 17:29:08 -0400, Jerry Stuckle
<jstucklex@attglobal.net> wrote:

>On 7/11/2011 4:08 PM, Graham Hobbs wrote:
>> On Sun, 10 Jul 2011 22:21:41 -0400, Jerry Stuckle
>> <jstucklex@attglobal.net>  wrote:
>>
>>> On 7/10/2011 10:01 PM, Graham Hobbs wrote:
>>>> Hello,
>>>>
>>>> I 'very laboriously' coded my index.php (close to novice level), for
>>>> my website and it is up and running. It's not public yet and needs to
>>>> stay that way. I need to give the address to two people who will help
>>>> with my product's development .. but they could reveal the address
>>>> anywhere, inadvertently or otherwise.
>>>>
>>>> If, for example, my website is www .lahdedah. com, I want to allow
>>>> full access to these two people (and me:-)) .. others would get a
>>>> 'Sorry, not yet available' screen. I envision hard coding their home
>>>> address's into my index.php?? Am not interested in any additional
>>>> typing by these three.
>>>>
>>>> Hope I've been clear. Is this feasible, easy/hard/unusual?
>>>> Please, thanks
>>>> Graham
>>>
>>> There are any number of ways to do it, none of which require PHP or any
>>> other server-side language.  Try alt.apache.configuration (assuming, of
>>> course, you're using Apache).
>>>
>>> Also, unless you are David Small of Small Expressions, you shouldn't be
>>> using his domain name in an example.  Use www.example.com, which is
>>> reserved for just such a purpose.
>> ---
>> Jerry, folks, thanks,
>>
>> Will check into alt.apache.configuration and apologies about lahdedah,
>> didn't know about example.com.
>>
>> But I wasn't emphatic enough .. yes I would know their IP addresses so
>> CAN I hard code them in my index.php? Yes or no would do and a PHP
>> buzzword I might search on to get started .. I just prefer all my code
>> in one place.
>>
>> .. am definitely not interested in extra keying of passwords by my two
>> associates.
>>
>> Thanks,
>> Graham
>
>You definitely need alt.apache.configuration.  No need to do anything to 
>your php code.
OK, thanks.

[toc] | [prev] | [next] | [standalone]


#2509

FromMichael Fesser <netizen@gmx.de>
Date2011-07-12 16:27 +0200
Message-ID<3bmo17h4sr9qa7du3nk9eucadcghlrjjke@mfesser.de>
In reply to#2501
.oO(Graham Hobbs)

>On Mon, 11 Jul 2011 17:29:08 -0400, Jerry Stuckle
>>
>>You definitely need alt.apache.configuration.  No need to do anything to 
>>your php code.
>
>OK, thanks.

Or search the Web for tutorials. The keyword to look for is "HTTP Basic
Authentication".

Micha

[toc] | [prev] | [next] | [standalone]


#2510

FromGraham Hobbs <ghobbs@cdpwise.net>
Date2011-07-12 11:23 -0400
Message-ID<tlpo17tm2vn174mc7cvstj3ls5pg5mte1b@4ax.com>
In reply to#2509
On Tue, 12 Jul 2011 16:27:09 +0200, Michael Fesser <netizen@gmx.de>
wrote:

>.oO(Graham Hobbs)
>
>>On Mon, 11 Jul 2011 17:29:08 -0400, Jerry Stuckle
>>>
>>>You definitely need alt.apache.configuration.  No need to do anything to 
>>>your php code.
>>
>>OK, thanks.
>
>Or search the Web for tutorials. The keyword to look for is "HTTP Basic
>Authentication".
>
>Micha
I will, thanks muchly!

[toc] | [prev] | [next] | [standalone]


#2512

FromChuck Anderson <cycletourist@invalid.invalid>
Date2011-07-12 10:33 -0600
Message-ID<ivht1f$5pu$1@dont-email.me>
In reply to#2509
Michael Fesser wrote:
> .oO(Graham Hobbs)
>
>   
>> On Mon, 11 Jul 2011 17:29:08 -0400, Jerry Stuckle
>>     
>>> You definitely need alt.apache.configuration.  No need to do anything to 
>>> your php code.
>>>       
>> OK, thanks.
>>     
>
> Or search the Web for tutorials. The keyword to look for is "HTTP Basic
> Authentication".
>
> Micha
>   


This will still require user input (a password), and the the OP said ...


> .... I envision hard coding their home
> address's into my index.php?? Am not interested in any additional
> typing by these three. 


So it would seem that the simplest solution that fits this bill is:

if ($_SERVER['REMOTE_ADDR'] != $ipaddr1 AND
$_SERVER['REMOTE_ADDR'] != $ipaddr2)
{
echo 'Sorry, not yet available';
exit;
}

-- 
*****************************
 Chuck Anderson • Boulder, CO
  http://cycletourist.com
 Turn Off, Tune Out, Drop In
*****************************

[toc] | [prev] | [next] | [standalone]


#2515

FromGraham Hobbs <ghobbs@cdpwise.net>
Date2011-07-12 13:04 -0400
Message-ID<5ruo175qegjbgre2bmm5kvfnqjfkpuibia@4ax.com>
In reply to#2512
On Tue, 12 Jul 2011 10:33:48 -0600, Chuck Anderson
<cycletourist@invalid.invalid> wrote:

>Michael Fesser wrote:
>> .oO(Graham Hobbs)
>>
>>   
>>> On Mon, 11 Jul 2011 17:29:08 -0400, Jerry Stuckle
>>>     
>>>> You definitely need alt.apache.configuration.  No need to do anything to 
>>>> your php code.
>>>>       
>>> OK, thanks.
>>>     
>>
>> Or search the Web for tutorials. The keyword to look for is "HTTP Basic
>> Authentication".
>>
>> Micha
>>   
>
>
>This will still require user input (a password), and the the OP said ...
>
>
>> .... I envision hard coding their home
>> address's into my index.php?? Am not interested in any additional
>> typing by these three. 
>
>
>So it would seem that the simplest solution that fits this bill is:
>
>if ($_SERVER['REMOTE_ADDR'] != $ipaddr1 AND
>$_SERVER['REMOTE_ADDR'] != $ipaddr2)
>{
>echo 'Sorry, not yet available';
>exit;
>}
Bullseye! Thankyou,
.. possible that there are those who will say you did my homework, I
generally do do the work, was waiting until the topic 'died', clues
gathered .. 
.. and until I'm ready to hook these two partners up, I can simply
code in my own IP.
Graham

[toc] | [prev] | [next] | [standalone]


#2517

FromJerry Stuckle <jstucklex@attglobal.net>
Date2011-07-12 15:13 -0400
Message-ID<ivi6d3$8b5$1@dont-email.me>
In reply to#2512
On 7/12/2011 12:33 PM, Chuck Anderson wrote:
> Michael Fesser wrote:
>> .oO(Graham Hobbs)
>>
>>> On Mon, 11 Jul 2011 17:29:08 -0400, Jerry Stuckle
>>>> You definitely need alt.apache.configuration. No need to do anything
>>>> to your php code.
>>> OK, thanks.
>>
>> Or search the Web for tutorials. The keyword to look for is "HTTP Basic
>> Authentication".
>>
>> Micha
>
>
> This will still require user input (a password), and the the OP said ...
>
>

Not necessarily.

>> .... I envision hard coding their home
>> address's into my index.php?? Am not interested in any additional
>> typing by these three.
>
>
> So it would seem that the simplest solution that fits this bill is:
>
> if ($_SERVER['REMOTE_ADDR'] != $ipaddr1 AND
> $_SERVER['REMOTE_ADDR'] != $ipaddr2)
> {
> echo 'Sorry, not yet available';
> exit;
> }
>

Nope.

-- 
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

[toc] | [prev] | [next] | [standalone]


#2519

FromChuck Anderson <cycletourist@invalid.invalid>
Date2011-07-12 15:19 -0600
Message-ID<ividpc$t59$1@dont-email.me>
In reply to#2517
Jerry Stuckle wrote:
> On 7/12/2011 12:33 PM, Chuck Anderson wrote:
>> Michael Fesser wrote:
>>> .oO(Graham Hobbs)
>>>
>>>> On Mon, 11 Jul 2011 17:29:08 -0400, Jerry Stuckle
>>>>> You definitely need alt.apache.configuration. No need to do anything
>>>>> to your php code.
>>>> OK, thanks.
>>>
>>> Or search the Web for tutorials. The keyword to look for is "HTTP Basic
>>> Authentication".
>>>
>>> Micha
>>
>>
>> This will still require user input (a password), and the the OP said ...
>>
>>
>
> Not necessarily.
>
>>> .... I envision hard coding their home
>>> address's into my index.php?? Am not interested in any additional
>>> typing by these three.
>>
>>
>> So it would seem that the simplest solution that fits this bill is:
>>
>> if ($_SERVER['REMOTE_ADDR'] != $ipaddr1 AND
>> $_SERVER['REMOTE_ADDR'] != $ipaddr2)
>> {
>> echo 'Sorry, not yet available';
>> exit;
>> }
>>
>
> Nope.
>

If the OP already knows Php and would have to research Apache directives 
and using htaccess to determine what to do, how to do it, and then test 
it, this is by far the simplest solution to his immediate needs.

-- 
*****************************
 Chuck Anderson • Boulder, CO
  http://cycletourist.com
 Turn Off, Tune Out, Drop In
*****************************

[toc] | [prev] | [next] | [standalone]


#2521

FromJerry Stuckle <jstucklex@attglobal.net>
Date2011-07-12 19:35 -0400
Message-ID<ivilne$f8r$1@dont-email.me>
In reply to#2519
On 7/12/2011 5:19 PM, Chuck Anderson wrote:
> Jerry Stuckle wrote:
>> On 7/12/2011 12:33 PM, Chuck Anderson wrote:
>>> Michael Fesser wrote:
>>>> .oO(Graham Hobbs)
>>>>
>>>>> On Mon, 11 Jul 2011 17:29:08 -0400, Jerry Stuckle
>>>>>> You definitely need alt.apache.configuration. No need to do anything
>>>>>> to your php code.
>>>>> OK, thanks.
>>>>
>>>> Or search the Web for tutorials. The keyword to look for is "HTTP Basic
>>>> Authentication".
>>>>
>>>> Micha
>>>
>>>
>>> This will still require user input (a password), and the the OP said ...
>>>
>>>
>>
>> Not necessarily.
>>
>>>> .... I envision hard coding their home
>>>> address's into my index.php?? Am not interested in any additional
>>>> typing by these three.
>>>
>>>
>>> So it would seem that the simplest solution that fits this bill is:
>>>
>>> if ($_SERVER['REMOTE_ADDR'] != $ipaddr1 AND
>>> $_SERVER['REMOTE_ADDR'] != $ipaddr2)
>>> {
>>> echo 'Sorry, not yet available';
>>> exit;
>>> }
>>>
>>
>> Nope.
>>
>
> If the OP already knows Php and would have to research Apache directives
> and using htaccess to determine what to do, how to do it, and then test
> it, this is by far the simplest solution to his immediate needs.
>

It's a couple of lines in his .htaccess, which would have readily been 
given him had he asked in the right newsgroup.

And he doesn't know PHP very well, either - if he did, he wouldn't have 
had to ask such an elementary question here.

There are many advantages to doing it in the Apache configuration, and 
none for doing it in PHP code.

-- 
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

[toc] | [prev] | [next] | [standalone]


#2502

FromChuck Anderson <cycletourist@invalid.invalid>
Date2011-07-11 17:24 -0600
Message-ID<ivg0n6$to2$1@dont-email.me>
In reply to#2499
Jerry Stuckle wrote:
> On 7/11/2011 4:08 PM, Graham Hobbs wrote:
>> On Sun, 10 Jul 2011 22:21:41 -0400, Jerry Stuckle
>> <jstucklex@attglobal.net> wrote:
>>
>>> On 7/10/2011 10:01 PM, Graham Hobbs wrote:
>>>> Hello,
>>>>
>>>> I 'very laboriously' coded my index.php (close to novice level), for
>>>> my website and it is up and running. It's not public yet and needs to
>>>> stay that way. I need to give the address to two people who will help
>>>> with my product's development .. but they could reveal the address
>>>> anywhere, inadvertently or otherwise.
>>>>
>>>> If, for example, my website is www .lahdedah. com, I want to allow
>>>> full access to these two people (and me:-)) .. others would get a
>>>> 'Sorry, not yet available' screen. I envision hard coding their home
>>>> address's into my index.php?? Am not interested in any additional
>>>> typing by these three.
>>>>
>>>> Hope I've been clear. Is this feasible, easy/hard/unusual?
>>>> Please, thanks
>>>> Graham
>>>
>>> There are any number of ways to do it, none of which require PHP or any
>>> other server-side language. Try alt.apache.configuration (assuming, of
>>> course, you're using Apache).
>>>
>>> Also, unless you are David Small of Small Expressions, you shouldn't be
>>> using his domain name in an example. Use www.example.com, which is
>>> reserved for just such a purpose.
>> ---
>> Jerry, folks, thanks,
>>
>> Will check into alt.apache.configuration and apologies about lahdedah,
>> didn't know about example.com.
>>
>> But I wasn't emphatic enough .. yes I would know their IP addresses so
>> CAN I hard code them in my index.php? Yes or no would do and a PHP
>> buzzword I might search on to get started .. I just prefer all my code
>> in one place.
>>
>> .. am definitely not interested in extra keying of passwords by my two
>> associates.
>>
>> Thanks,
>> Graham
>
> You definitely need alt.apache.configuration. No need to do anything 
> to your php code.
>

If you know the IP addrs - simply compare them to the Php global 
$SERVER['REMOTE_ADDR'].


-- 
*****************************
 Chuck Anderson • Boulder, CO
  http://cycletourist.com
 Turn Off, Tune Out, Drop In
*****************************

[toc] | [prev] | [next] | [standalone]


#2504

FromJerry Stuckle <jstucklex@attglobal.net>
Date2011-07-11 20:38 -0400
Message-ID<ivg51v$ktn$1@dont-email.me>
In reply to#2502
On 7/11/2011 7:24 PM, Chuck Anderson wrote:
> Jerry Stuckle wrote:
>> On 7/11/2011 4:08 PM, Graham Hobbs wrote:
>>> On Sun, 10 Jul 2011 22:21:41 -0400, Jerry Stuckle
>>> <jstucklex@attglobal.net> wrote:
>>>
>>>> On 7/10/2011 10:01 PM, Graham Hobbs wrote:
>>>>> Hello,
>>>>>
>>>>> I 'very laboriously' coded my index.php (close to novice level), for
>>>>> my website and it is up and running. It's not public yet and needs to
>>>>> stay that way. I need to give the address to two people who will help
>>>>> with my product's development .. but they could reveal the address
>>>>> anywhere, inadvertently or otherwise.
>>>>>
>>>>> If, for example, my website is www .lahdedah. com, I want to allow
>>>>> full access to these two people (and me:-)) .. others would get a
>>>>> 'Sorry, not yet available' screen. I envision hard coding their home
>>>>> address's into my index.php?? Am not interested in any additional
>>>>> typing by these three.
>>>>>
>>>>> Hope I've been clear. Is this feasible, easy/hard/unusual?
>>>>> Please, thanks
>>>>> Graham
>>>>
>>>> There are any number of ways to do it, none of which require PHP or any
>>>> other server-side language. Try alt.apache.configuration (assuming, of
>>>> course, you're using Apache).
>>>>
>>>> Also, unless you are David Small of Small Expressions, you shouldn't be
>>>> using his domain name in an example. Use www.example.com, which is
>>>> reserved for just such a purpose.
>>> ---
>>> Jerry, folks, thanks,
>>>
>>> Will check into alt.apache.configuration and apologies about lahdedah,
>>> didn't know about example.com.
>>>
>>> But I wasn't emphatic enough .. yes I would know their IP addresses so
>>> CAN I hard code them in my index.php? Yes or no would do and a PHP
>>> buzzword I might search on to get started .. I just prefer all my code
>>> in one place.
>>>
>>> .. am definitely not interested in extra keying of passwords by my two
>>> associates.
>>>
>>> Thanks,
>>> Graham
>>
>> You definitely need alt.apache.configuration. No need to do anything
>> to your php code.
>>
>
> If you know the IP addrs - simply compare them to the Php global
> $SERVER['REMOTE_ADDR'].
>
>

No need to even go to that trouble.  It can all be done in the Apache 
configuration with no changes to the web pages at all.

-- 
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

[toc] | [prev] | [next] | [standalone]


#2538

FromLuuk <Luuk@invalid.lan>
Date2011-07-13 21:13 +0200
Message-ID<4e1dee63$0$23963$e4fe514c@news2.news.xs4all.nl>
In reply to#2504
On 12-07-2011 02:38, Jerry Stuckle wrote:
> On 7/11/2011 7:24 PM, Chuck Anderson wrote:
>> Jerry Stuckle wrote:
>>> On 7/11/2011 4:08 PM, Graham Hobbs wrote:
>>>> On Sun, 10 Jul 2011 22:21:41 -0400, Jerry Stuckle
>>>> <jstucklex@attglobal.net> wrote:
>>>>
>>>>> On 7/10/2011 10:01 PM, Graham Hobbs wrote:
>>>>>> Hello,
>>>>>>
>>>>>> I 'very laboriously' coded my index.php (close to novice level), for
>>>>>> my website and it is up and running. It's not public yet and needs to
>>>>>> stay that way. I need to give the address to two people who will help
>>>>>> with my product's development .. but they could reveal the address
>>>>>> anywhere, inadvertently or otherwise.
>>>>>>
>>>>>> If, for example, my website is www .lahdedah. com, I want to allow
>>>>>> full access to these two people (and me:-)) .. others would get a
>>>>>> 'Sorry, not yet available' screen. I envision hard coding their home
>>>>>> address's into my index.php?? Am not interested in any additional
>>>>>> typing by these three.
>>>>>>
>>>>>> Hope I've been clear. Is this feasible, easy/hard/unusual?
>>>>>> Please, thanks
>>>>>> Graham
>>>>>
>>>>> There are any number of ways to do it, none of which require PHP or
>>>>> any
>>>>> other server-side language. Try alt.apache.configuration (assuming, of
>>>>> course, you're using Apache).
>>>>>
>>>>> Also, unless you are David Small of Small Expressions, you
>>>>> shouldn't be
>>>>> using his domain name in an example. Use www.example.com, which is
>>>>> reserved for just such a purpose.
>>>> ---
>>>> Jerry, folks, thanks,
>>>>
>>>> Will check into alt.apache.configuration and apologies about lahdedah,
>>>> didn't know about example.com.
>>>>
>>>> But I wasn't emphatic enough .. yes I would know their IP addresses so
>>>> CAN I hard code them in my index.php? Yes or no would do and a PHP
>>>> buzzword I might search on to get started .. I just prefer all my code
>>>> in one place.
>>>>
>>>> .. am definitely not interested in extra keying of passwords by my two
>>>> associates.
>>>>
>>>> Thanks,
>>>> Graham
>>>
>>> You definitely need alt.apache.configuration. No need to do anything
>>> to your php code.
>>>
>>
>> If you know the IP addrs - simply compare them to the Php global
>> $SERVER['REMOTE_ADDR'].
>>
>>
> 
> No need to even go to that trouble.  It can all be done in the Apache
> configuration with no changes to the web pages at all.
> 

Jerry,
Can you explain the REAL benefits of doing this in apache,
despite the fact that this is a PHP-newsgroup?,

And the real drawbacks from changing a bit to his own php-code just for
this case?

I simply dont understand why sending him away to
alt.apache.configuration is better ....



-- 
Luuk

[toc] | [prev] | [next] | [standalone]


#2540

FromThe Natural Philosopher <tnp@invalid.invalid>
Date2011-07-13 20:43 +0100
Message-ID<ivksg5$mle$1@news.albasani.net>
In reply to#2538
Luuk wrote:
> On 12-07-2011 02:38, Jerry Stuckle wrote:
>> On 7/11/2011 7:24 PM, Chuck Anderson wrote:
>>> Jerry Stuckle wrote:
>>>> On 7/11/2011 4:08 PM, Graham Hobbs wrote:
>>>>> On Sun, 10 Jul 2011 22:21:41 -0400, Jerry Stuckle
>>>>> <jstucklex@attglobal.net> wrote:
>>>>>
>>>>>> On 7/10/2011 10:01 PM, Graham Hobbs wrote:
>>>>>>> Hello,
>>>>>>>
>>>>>>> I 'very laboriously' coded my index.php (close to novice level), for
>>>>>>> my website and it is up and running. It's not public yet and needs to
>>>>>>> stay that way. I need to give the address to two people who will help
>>>>>>> with my product's development .. but they could reveal the address
>>>>>>> anywhere, inadvertently or otherwise.
>>>>>>>
>>>>>>> If, for example, my website is www .lahdedah. com, I want to allow
>>>>>>> full access to these two people (and me:-)) .. others would get a
>>>>>>> 'Sorry, not yet available' screen. I envision hard coding their home
>>>>>>> address's into my index.php?? Am not interested in any additional
>>>>>>> typing by these three.
>>>>>>>
>>>>>>> Hope I've been clear. Is this feasible, easy/hard/unusual?
>>>>>>> Please, thanks
>>>>>>> Graham
>>>>>> There are any number of ways to do it, none of which require PHP or
>>>>>> any
>>>>>> other server-side language. Try alt.apache.configuration (assuming, of
>>>>>> course, you're using Apache).
>>>>>>
>>>>>> Also, unless you are David Small of Small Expressions, you
>>>>>> shouldn't be
>>>>>> using his domain name in an example. Use www.example.com, which is
>>>>>> reserved for just such a purpose.
>>>>> ---
>>>>> Jerry, folks, thanks,
>>>>>
>>>>> Will check into alt.apache.configuration and apologies about lahdedah,
>>>>> didn't know about example.com.
>>>>>
>>>>> But I wasn't emphatic enough .. yes I would know their IP addresses so
>>>>> CAN I hard code them in my index.php? Yes or no would do and a PHP
>>>>> buzzword I might search on to get started .. I just prefer all my code
>>>>> in one place.
>>>>>
>>>>> .. am definitely not interested in extra keying of passwords by my two
>>>>> associates.
>>>>>
>>>>> Thanks,
>>>>> Graham
>>>> You definitely need alt.apache.configuration. No need to do anything
>>>> to your php code.
>>>>
>>> If you know the IP addrs - simply compare them to the Php global
>>> $SERVER['REMOTE_ADDR'].
>>>
>>>
>> No need to even go to that trouble.  It can all be done in the Apache
>> configuration with no changes to the web pages at all.
>>
> 
> Jerry,
> Can you explain the REAL benefits of doing this in apache,
> despite the fact that this is a PHP-newsgroup?,
> 

Never heard of jerry explaining anything.

> And the real drawbacks from changing a bit to his own php-code just for
> this case?
> 
> I simply dont understand why sending him away to
> alt.apache.configuration is better ....
> 

No, its just Jerry being dumb and stubborn as usual.

On the basis that te OP wants to play in the PHP sandpit and not the 
Apache sandpit the optimal and more than adequate solution is to use the 
pre-loaded variables to examine the browser remote IP address and 
display page material contingent on that.

Its a far more powerful and flexible way, and is the sort of thing you 
might use to say 'Vous etes en France, Pour la version en Anglais, ici->'

(You could aslo reconfigure your firewall to only allow physical IP 
access from them:Sledgehammers and nuts)


As opposed to 'enter name and password to see my crap test website'

You have to do the latter of your victims are on dynamic addresses though.

> 
> 

[toc] | [prev] | [next] | [standalone]


#2542

FromLuuk <Luuk@invalid.lan>
Date2011-07-13 21:53 +0200
Message-ID<4e1df7c8$0$23949$e4fe514c@news2.news.xs4all.nl>
In reply to#2540
On 13-07-2011 21:43, The Natural Philosopher wrote:
> Luuk wrote:
>> On 12-07-2011 02:38, Jerry Stuckle wrote:
>>> On 7/11/2011 7:24 PM, Chuck Anderson wrote:
>>>> Jerry Stuckle wrote:
>>>>> On 7/11/2011 4:08 PM, Graham Hobbs wrote:
>>>>>> On Sun, 10 Jul 2011 22:21:41 -0400, Jerry Stuckle
>>>>>> <jstucklex@attglobal.net> wrote:
>>>>>>
>>>>>>> On 7/10/2011 10:01 PM, Graham Hobbs wrote:
>>>>>>>> Hello,
>>>>>>>>
>>>>>>>> I 'very laboriously' coded my index.php (close to novice level),
>>>>>>>> for
>>>>>>>> my website and it is up and running. It's not public yet and
>>>>>>>> needs to
>>>>>>>> stay that way. I need to give the address to two people who will
>>>>>>>> help
>>>>>>>> with my product's development .. but they could reveal the address
>>>>>>>> anywhere, inadvertently or otherwise.
>>>>>>>>
>>>>>>>> If, for example, my website is www .lahdedah. com, I want to allow
>>>>>>>> full access to these two people (and me:-)) .. others would get a
>>>>>>>> 'Sorry, not yet available' screen. I envision hard coding their
>>>>>>>> home
>>>>>>>> address's into my index.php?? Am not interested in any additional
>>>>>>>> typing by these three.
>>>>>>>>
>>>>>>>> Hope I've been clear. Is this feasible, easy/hard/unusual?
>>>>>>>> Please, thanks
>>>>>>>> Graham
>>>>>>> There are any number of ways to do it, none of which require PHP or
>>>>>>> any
>>>>>>> other server-side language. Try alt.apache.configuration
>>>>>>> (assuming, of
>>>>>>> course, you're using Apache).
>>>>>>>
>>>>>>> Also, unless you are David Small of Small Expressions, you
>>>>>>> shouldn't be
>>>>>>> using his domain name in an example. Use www.example.com, which is
>>>>>>> reserved for just such a purpose.
>>>>>> ---
>>>>>> Jerry, folks, thanks,
>>>>>>
>>>>>> Will check into alt.apache.configuration and apologies about
>>>>>> lahdedah,
>>>>>> didn't know about example.com.
>>>>>>
>>>>>> But I wasn't emphatic enough .. yes I would know their IP
>>>>>> addresses so
>>>>>> CAN I hard code them in my index.php? Yes or no would do and a PHP
>>>>>> buzzword I might search on to get started .. I just prefer all my
>>>>>> code
>>>>>> in one place.
>>>>>>
>>>>>> .. am definitely not interested in extra keying of passwords by my
>>>>>> two
>>>>>> associates.
>>>>>>
>>>>>> Thanks,
>>>>>> Graham
>>>>> You definitely need alt.apache.configuration. No need to do anything
>>>>> to your php code.
>>>>>
>>>> If you know the IP addrs - simply compare them to the Php global
>>>> $SERVER['REMOTE_ADDR'].
>>>>
>>>>
>>> No need to even go to that trouble.  It can all be done in the Apache
>>> configuration with no changes to the web pages at all.
>>>
>>
>> Jerry,
>> Can you explain the REAL benefits of doing this in apache,
>> despite the fact that this is a PHP-newsgroup?,
>>
> 
> Never heard of jerry explaining anything.
> 
>> And the real drawbacks from changing a bit to his own php-code just for
>> this case?
>>
>> I simply dont understand why sending him away to
>> alt.apache.configuration is better ....
>>
> 
> No, its just Jerry being dumb and stubborn as usual.
> 
> On the basis that te OP wants to play in the PHP sandpit and not the
> Apache sandpit the optimal and more than adequate solution is to use the
> pre-loaded variables to examine the browser remote IP address and
> display page material contingent on that.
> 
> Its a far more powerful and flexible way, and is the sort of thing you
> might use to say 'Vous etes en France, Pour la version en Anglais, ici->'
> 
> (You could aslo reconfigure your firewall to only allow physical IP
> access from them:Sledgehammers and nuts)
> 
> 
> As opposed to 'enter name and password to see my crap test website'
> 
> You have to do the latter of your victims are on dynamic addresses though.
> 
>>
>>

I understand that,
and indeed, in this case PHP should do well,

When i was a employee of a firewall-selling-company, i would probably
reconfigure my (hardware-)firewall ;)

And, last (but not least), when i did not know enough about PHP, i would
add some rules to my apache-config.....

-- 
Luuk

[toc] | [prev] | [next] | [standalone]


#2547

FromThe Natural Philosopher <tnp@invalid.invalid>
Date2011-07-14 00:17 +0100
Message-ID<ivl929$h19$4@news.albasani.net>
In reply to#2542
Luuk wrote:
> On 13-07-2011 21:43, The Natural Philosopher wrote:
>> Luuk wrote:
>>> On 12-07-2011 02:38, Jerry Stuckle wrote:
>>>> On 7/11/2011 7:24 PM, Chuck Anderson wrote:
>>>>> Jerry Stuckle wrote:
>>>>>> On 7/11/2011 4:08 PM, Graham Hobbs wrote:
>>>>>>> On Sun, 10 Jul 2011 22:21:41 -0400, Jerry Stuckle
>>>>>>> <jstucklex@attglobal.net> wrote:
>>>>>>>
>>>>>>>> On 7/10/2011 10:01 PM, Graham Hobbs wrote:
>>>>>>>>> Hello,
>>>>>>>>>
>>>>>>>>> I 'very laboriously' coded my index.php (close to novice level),
>>>>>>>>> for
>>>>>>>>> my website and it is up and running. It's not public yet and
>>>>>>>>> needs to
>>>>>>>>> stay that way. I need to give the address to two people who will
>>>>>>>>> help
>>>>>>>>> with my product's development .. but they could reveal the address
>>>>>>>>> anywhere, inadvertently or otherwise.
>>>>>>>>>
>>>>>>>>> If, for example, my website is www .lahdedah. com, I want to allow
>>>>>>>>> full access to these two people (and me:-)) .. others would get a
>>>>>>>>> 'Sorry, not yet available' screen. I envision hard coding their
>>>>>>>>> home
>>>>>>>>> address's into my index.php?? Am not interested in any additional
>>>>>>>>> typing by these three.
>>>>>>>>>
>>>>>>>>> Hope I've been clear. Is this feasible, easy/hard/unusual?
>>>>>>>>> Please, thanks
>>>>>>>>> Graham
>>>>>>>> There are any number of ways to do it, none of which require PHP or
>>>>>>>> any
>>>>>>>> other server-side language. Try alt.apache.configuration
>>>>>>>> (assuming, of
>>>>>>>> course, you're using Apache).
>>>>>>>>
>>>>>>>> Also, unless you are David Small of Small Expressions, you
>>>>>>>> shouldn't be
>>>>>>>> using his domain name in an example. Use www.example.com, which is
>>>>>>>> reserved for just such a purpose.
>>>>>>> ---
>>>>>>> Jerry, folks, thanks,
>>>>>>>
>>>>>>> Will check into alt.apache.configuration and apologies about
>>>>>>> lahdedah,
>>>>>>> didn't know about example.com.
>>>>>>>
>>>>>>> But I wasn't emphatic enough .. yes I would know their IP
>>>>>>> addresses so
>>>>>>> CAN I hard code them in my index.php? Yes or no would do and a PHP
>>>>>>> buzzword I might search on to get started .. I just prefer all my
>>>>>>> code
>>>>>>> in one place.
>>>>>>>
>>>>>>> .. am definitely not interested in extra keying of passwords by my
>>>>>>> two
>>>>>>> associates.
>>>>>>>
>>>>>>> Thanks,
>>>>>>> Graham
>>>>>> You definitely need alt.apache.configuration. No need to do anything
>>>>>> to your php code.
>>>>>>
>>>>> If you know the IP addrs - simply compare them to the Php global
>>>>> $SERVER['REMOTE_ADDR'].
>>>>>
>>>>>
>>>> No need to even go to that trouble.  It can all be done in the Apache
>>>> configuration with no changes to the web pages at all.
>>>>
>>> Jerry,
>>> Can you explain the REAL benefits of doing this in apache,
>>> despite the fact that this is a PHP-newsgroup?,
>>>
>> Never heard of jerry explaining anything.
>>
>>> And the real drawbacks from changing a bit to his own php-code just for
>>> this case?
>>>
>>> I simply dont understand why sending him away to
>>> alt.apache.configuration is better ....
>>>
>> No, its just Jerry being dumb and stubborn as usual.
>>
>> On the basis that te OP wants to play in the PHP sandpit and not the
>> Apache sandpit the optimal and more than adequate solution is to use the
>> pre-loaded variables to examine the browser remote IP address and
>> display page material contingent on that.
>>
>> Its a far more powerful and flexible way, and is the sort of thing you
>> might use to say 'Vous etes en France, Pour la version en Anglais, ici->'
>>
>> (You could aslo reconfigure your firewall to only allow physical IP
>> access from them:Sledgehammers and nuts)
>>
>>
>> As opposed to 'enter name and password to see my crap test website'
>>
>> You have to do the latter of your victims are on dynamic addresses though.
>>
>>>
> 
> I understand that,
> and indeed, in this case PHP should do well,
> 
> When i was a employee of a firewall-selling-company, i would probably
> reconfigure my (hardware-)firewall ;)
> 
> And, last (but not least), when i did not know enough about PHP, i would
> add some rules to my apache-config.....
> 

Ive done all the options in various places.

One thing that has become standard is to include on a site of related 
pages a standard file that - usually - does things like user 
authentication and drawing menu buttons and suchlike

If that is common to all pages, it solves the problem of having to patch 
many to ensure authentication across a whole site.

[toc] | [prev] | [next] | [standalone]


Page 1 of 2  [1] 2  Next page →

Back to top | Article view | comp.lang.php


csiph-web