I have a page and I would like to allow access to this page only from domains that I allow. What would be the best way of doing this?
migrated from stackoverflow.com Jan 9 '12 at 2:08
This question came from our site for professional and enthusiast programmers.
closed as off topic by Mark Henderson♦ Jan 9 '12 at 2:17
Questions on Server Fault are expected to relate to professional server, networking, or related infrastructure administration within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.
You can start by checking
use $_SERVER['HTTP_REFERER'] to check what website is accessing your page and compare it with your list of website.
user it in the header part of your page like following,