You are here: Re: To allow access only from the designated site. « PHP Programming Language « IT news, forums, messages
Re: To allow access only from the designated site.

Posted by Jerry Stuckle on 06/28/07 13:49

Ben Sehara wrote:
> Is there any way I can limit the access to my website? I have a site "A" and
> I want to allow access to it only from site "B" login user.
>
> If someone try to access site "A" directory, I want it redirected to site
> "B" for login. After login at site "B", you see the link to site"A". When
> you click it, you see login page for site "A".
>
> Is it possible?
>
> Thanks.
> Ben
>
>

Ben,

Not easily. The problem here is if you set a cookie on Site B, it won't
be sent to site A.

If they are on the same server (or otherwise have access to the same
database), you could enter a row in the database with a long, random key
(i.e. a MD5 hash) and pass that value in the GET or POST request. If
it's in the database, then allow them access. If not, redirect them
back. Of course, you would have to clean up the info occasionally.

There are other ways, but they would be along the same lines.

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

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация