ionCube Logo
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


 
Post new topic   Reply to topic    ionCube Forum Index -> ionCube PHP Encoder

Restrict to several domain names

Author Message
tristan



Joined: 28 Jul 2005
Posts: 2

PostPosted: Thu Jul 28, 2005 3:53 pm    Post subject: Restrict to several domain names Reply with quote

Hi,

i restrict a coding file to several domain names (www.domain1.com,www.domain2.com,www.domain3.com), and it work's fine Smile

I would like to do a different treatment according to the domain name, directly in my encoded file... Something like this :

Code:
switch ($_SERVER["HTTP_HOST"]) {
                                  case 'www.domain1.com':
                                         //do this                                 
                                  break;
                                 case 'www.domain2.com':
                                       //do this
                                  break;
                                  case 'www.domain3.com':
                                       //do this
                                  break;
                         }


i can't do this because $_SERVER is not secure (user can modify it).

How can i get the domain name in secure way ? can i use a ioncube loader function ?

Best regards Surprised
(sorry if my english is not very good Embarassed )
Back to top
View user's profile Send private message
liaison
ionCube Support


Joined: 16 Dec 2004
Posts: 2788

PostPosted: Thu Jul 28, 2005 5:45 pm    Post subject: Reply with quote

There isn't a Loader API function at the moment to return the server name as read at startup.

There are few things you might do though. If you are encoding the files separately for each domain, you could use a property to store a value that indicates how the code should behave, or in some other way have a file that is restricted to one of the domains that gives that information. In version 6, where you can use license files, there is an API function that can be called by an encoded file to return information about the license file, and this could contani information to say how your application should behave.
_________________
Community Admin
Back to top
View user's profile Send private message
tristan



Joined: 28 Jul 2005
Posts: 2

PostPosted: Fri Jul 29, 2005 8:48 am    Post subject: Reply with quote

hi,

i would like to restrict several domains in the same encoding file Sad
i try to do it in another way...

Thank's for the answered Wink

Best regards Very Happy
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    ionCube Forum Index -> ionCube PHP Encoder All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum