Re: locking to domain
| From: | Pavel Jartsev | Date: | Fri, 30 Jan 2004 08:27:59 +0000 |
| Subject: | Re: locking to domain | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-176310@lists.php.net to get a copy of this message | ||
Ryan A wrote:
Hey all, I have a rather simple need that I am sure a lot of you must have gone through, I need a bit of code so that the script can run only at "something.com"..I am generating a MD5 license "key" based on that... Problem that I am having is.. wont I need 2 "keys" to see if the domain is with a "www" (eg www.something.com) or is being run without the "www" (eg: http://something.com) ? I'm pretty sure it can be done with one key....but how?Maybe i've misunderstood the question, but U can check variable $_SERVER['HTTP_HOST'] and make decisions according to it. Hope that helps. :) -- Pavel a.k.a. Papi