Php include and page retrictions

hello, coming here , i have tried anything possible but i have failed to nail this problem.
I have a registration program installed online and ready for users to register, but recently i bought a video chat room and i want he software to have an php include from the registration program to protect the chat room index file such that users will have restriction.

registration software is installed at domain.com and the video chat software is installed at sub.domain.com so i want a php restriction code include file from domain.com to restrict access to sub.domain.com so the only registered users can access the sub.domain.com

also note that sub.domain.com is open anyone can use but has session access. and domain.com is a registration site with session access and restriction.

so i need help in restriction of sub.domain.com using …/inc/restrict.php file from domain.com

i will be glad
katsry

It sounds like you need an include that checks for login/session to see if a user is already authenticated, otherwise redirect to the login page.

What you need specifically will depend on how your authentication works.

The actual problem is, both programs have sessions, one has a registration/ login the other is open with no registration , so what i want is to restrict a software program with no registration,with registration restriction from the other login/ register program, but when i try i get sessional crash from both programs :frowning: so what can i do to resolve this?

It isn’t clear what your trying to do, although from the post I know you are trying hard to explain it.

My first thought would be to create a specific session variable to test for allowance to the sub domain. Outside of that, you could try domain level authentication on the sub domain only.

What if you passed a key to the second site, perhaps some form of encoded token or secret key, via url?

Sponsor our Newsletter | Privacy Policy | Terms of Service