FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Restricting access to a website
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Restricting access to a website [message #174837 is a reply to message #174835] Tue, 12 July 2011 23:35 Go to previous messageGo to previous message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma:
Senior Member
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(at)attglobal(dot)net
==================
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: how to implement AJAX to html
Next Topic: sending email
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Wed Nov 27 12:21:30 GMT 2024

Total time taken to generate the page: 0.03622 seconds