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 Loader

license properties question

Author Message
merebhai



Joined: 27 Dec 2005
Posts: 5

PostPosted: Tue Dec 27, 2005 6:41 pm    Post subject: license properties question Reply with quote

Hi,
Anybody there can u please tell me how to get ioncube_license_properties in a php
please ...........
i tried in php file like this:

$temparray = ioncube_license_properties();
print_r($temparray);

Its not working..............

I am calling this function from a unencoded files. I want to diplay the properties of license file on browser using php file. Is it possible ?

Bhai log, Thanks in advance.
Back to top
View user's profile Send private message
liaison
ionCube Support


Joined: 16 Dec 2004
Posts: 2788

PostPosted: Tue Dec 27, 2005 8:05 pm    Post subject: Reply with quote

Hi

This API function can of course only be called from an encoded file - otherwise any script could read the private properties from an encoded file, and this would defeat the whole point.

License files are for use by a secured application, and so can only be read by secure applications, not any plain text script.

For more information, please check the Loader API part in the user guide.
_________________
Community Admin
Back to top
View user's profile Send private message
merebhai



Joined: 27 Dec 2005
Posts: 5

PostPosted: Wed Dec 28, 2005 5:08 am    Post subject: Reply with quote

yes , Thanks, i read u r document. But can u please guide me. How can i show my license properties.

In My product i want to add a php file that will show license properties. So that the customer can get information regarding license.

Any ideas how cna we find out this ?
Back to top
View user's profile Send private message
liaison
ionCube Support


Joined: 16 Dec 2004
Posts: 2788

PostPosted: Fri Dec 30, 2005 2:34 pm    Post subject: Reply with quote

Hi

There are two things that you can do. Firstly, the license files themselves are plain text, and when creating a license file you can specify whether or not restrictions or any properties are to be exposed. Any "exposed" information, as well as being part of the encoded license data, will appear in a human readable form in the license file. This feature was designed so that end user can always just look at their license file at any time to see information about it.

The programmatic way is to use ioncube_license_properties() as mentioned earlier. As long as the script in your application that calls this function is encoded and has been restricted to require the license file in question, calling the API function will return an associative array with information about the license file. For obvious security reasons, an encoded file can only read the properties of a license file that it is designed to work with, e.g. with a matching passphrase, and only if the license file and encoded file were created by the same ionCube customer.

Often license file checking will be enforced by the Loader, but this does mean that your application will not be able to show information about an expired license file and you may want it to or to behave differently if a license had expired. The solution to this is to use "script" based validation of license files rather than "automatic" (Loader) based checking. With script based checking, provided that a license file is found and that the basic authentication checks such as matching passphrase are passed, the encoded application can execute whether or not the license file restrictions are satisfied. This would allow your program to display information from the license file if you really wanted to even if it isn't valid for a particular machine. At some point though your program will presumably want to verify the license file, and there are three API functions for this.

Code:
ioncube_check_license_properties()


returns TRUE if all enforced license properties are matched in the encoded file. Otherwise an array is returned consisting of all unmatched enforced properties.

Code:
ioncube_license_matches_server()


returns FALSE if the file is encoded, has a license, and the license has a server restriction which is not met by the current server. In all other cases the function returns TRUE.

Code:
ioncube_license_has_expired()


returns TRUE if the file is encoded, has a license, and the license has an expiry time which has passed. In all other cases the function returns FALSE.
_________________
Community Admin
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    ionCube Forum Index -> ionCube Loader 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