Way to detect the domain through PHP

I'm using SimpleCMS to allow the client to make simple textual changes to their website; however, I'm having some issues here as part of the website is password protected through setting a PHP $_SESSION variable. From this secure page, an if(!isset) is run on this $_SESSION variable to allow or disallow viewing.

Simple CMS works by logging in to www.contenteditor.net and it loads the pages into some sort of frame (I use the word frame loosely). What I want to know is, in addition to my if(!isset) test, is there a way to see if the current domain is contenteditor.net and allow them access?

Any Help is appreciated,

Dan

Answers


$_SERVER['SERVER_NAME'] and parse?


Use $_SERVER['HTTP_HOST'] to check your host address and $_SERVER['SERVER_NAME'] could also be used.


Need Your Help

Best way to write a RESTful service “client” in .Net?

.net web-services rest

What techniques do people use to "consume" services in the REST stile on .Net ? Plain http client? Related to this: many rest services are now using JSON (its tighter and faster) - so what JSON lib...

Removing consecutive duplicates with XSLT

xml xslt xpath

I have some XML where I would like to remove identical consecutive child nodes, which are in different parents. That is, if a child (in different parents) node my XML tree appears two times or more

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.