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

What function to use to hash passwords in MySQL?

php mysql hash passwords

I have a user table in my mysql database that has a password column. Currently, I use the MD5 algorithm to hash the users' password for storage in the database. Now I like to think that I am a secu...

Is there a simple Program Files/Program Files (x86) directive for C++ in windows?

c++ windows path

I am currently hard-coding the path to my application as follows:

Java/GWT/MySQL: connection refused?

java mysql gwt

I am developing a GWT web app and am trying to connect to a mysql-database from my RemoteServiceServlet implementation (for rpc).

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.