Re: Restricting access to a website [message #174831 is a reply to message #174829] |
Tue, 12 July 2011 17:04 |
Graham Hobbs
Messages: 42 Registered: September 2010
Karma:
|
Member |
|
|
On Tue, 12 Jul 2011 10:33:48 -0600, Chuck Anderson
<cycletourist(at)invalid(dot)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
|
|
|