[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [cobalt-developers] php and ip check
- Subject: Re: [cobalt-developers] php and ip check
- From: "Dave @ The Hostworks" <dave@xxxxxxxxxxxxxxxx>
- Date: Wed Apr 30 19:03:01 2003
- List-id: Discussion Forum for developers on Sun Cobalt Networks products <cobalt-developers.list.cobalt.com>
if (trim($REMOTE_ADDR) != "xxx.xx.xx.xx"){
echo "Access DENIED!";
else
Header("Location: http:site/address")
}
exit;----- Original Message -----
From: "nick 76" <njd76@xxxxxxxxxxx>
To: <cobalt-developers@xxxxxxxxxxxxxxx>
Sent: Wednesday, April 30, 2003 11:37 AM
Subject: Re: [cobalt-developers] php and ip check
> Can someone give me a hand please.
>
> I have a client who want a php script that checks for 3 ip addresses. If
the
> ip is in the "OK" list then they move foward to a webpage, if they are not
> in the "ok" list then i take them to a different web page. so far i found
> this as a starting point:
>
> <?php
>
> if (trim($REMOTE_ADDR) != "xxx.xx.xx.xx"){
> echo "<script>alert(\"Invalid IP Address(You Can't do
> this).\");history.go(-1)</script>\n";
> exit;
> }
> ?>
>
>
> can anyone give me a hand please.
>
> Thanks
>
> _________________________________________________________________
> MSN 8 with e-mail virus protection service: 2 months FREE*
> http://join.msn.com/?page=features/virus
>
> _______________________________________________
> cobalt-developers mailing list
> cobalt-developers@xxxxxxxxxxxxxxx
> http://list.cobalt.com/mailman/listinfo/cobalt-developers
>