Re: Checking an URL
| From: | elias | Date: | Wed, 23 May 2001 23:08:33 +0000 |
| Subject: | Re: Checking an URL | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-54029@lists.php.net to get a copy of this message | ||
$url = "http://". $HTTP_HOST. $REQUEST_URI;
-elias
http://www.eassoft.cjb.net
""YoBro"" <nospam@brochures.co.nz> wrote in message
news:9efha5$9q2$1@toye.p.sourceforge.net...
> Hello Everybody :-)
>
> I've been trying to figure something out, but just cant find the right
> answer.
>
> I need some code to check that the page is being viewed from a specific
url.
> EXAMPLE: Not just http://www but
> https://www1 if it is https://www1
> then
> show the page otherwise echo a message.
>
> The reason is I don't want people to view certain pages without the secure
> server connection.
>
> I thought along these lines:
> $url=parse_url( some code to get the current URL); //Not sure how to do
that
> part.
> if ($url[scheme] != 'https'){
> echo "This page must be viewed on a secure connection - Please use the
> links";
> }else{
> Rest of Page Information
> }
>
>
> What do you rekon,
> Am i close or miles off.
>
> Any help would be really great.
>
> YoBro
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>