Using LimeLM with a Locally installed Apache/PHP server.

I am planning to move my Adobe AIR application over to a "web-based" model where Apache/PHP/Postgres would be installed on the user's machine (currently I would only support Windows and possibly Mac in the future) and the product would be accessed using something like http://localhost:<someportnumber>

I need the power of a real RDBMS (with no-cost) as opposed to sqlite and I need an application language that manages it memory better and has more web-based flexibility down the road. I would also plan on encrypting my PHP code, with something like Zend Guard so it can't be just copied and taken.

In this scenario I am unsure how I might integrate a LimeLM activation, if its even possible, any suggestions?

Thanks!

In this scenario I am unsure how I might integrate a LimeLM activation, if its even possible, any suggestions?

There are a couple of ways you can do it. The best way is to create a simple PHP extension in either C or C++. That C/C++ PHP extension will use TurboActivate. And you'll use the PHP extension somewhere in your app.

Does that make sense?

Thanks for the info, I might be able to use a php extension although it might be pretty hard to build the right extension for both various versions of windows and a mac.......you had a mentioned you might have a couple of solutions, what might be a couple other ways to accomplish this?

Well, the other way might be to have an native executable that you pass information to using exec. So basically the executable does all the work using TurboActivate and you just read the results.

Frankly, the php extension would be better.

Thanks, I completely agree that the PHP extension route is better - I am going to try and pursue that first.

Is there a reference to all of the command line parameters that TurboActivate.exe accepts and is there a way for TurboActivate.exe to list out the current activation and license data so my script could parse it and could I activate using the command line with no GUI component (something like TurboActivate.exe activate <license key> and it returns success and the license data)?

Is there a reference to all of the command line parameters that TurboActivate.exe accepts

Yes.

is there a way for TurboActivate.exe to list out the current activation and license data so my script could parse it and could I activate using the command line with no GUI component

No, the TurboActivate wizard is meant to be a GUI. If you want an exe that you can talk to (rather than just using the TurboActivate API) then look at the Adobe AIR example. All of the work is done by talking to the helper exe (systa).

I have been at this for a bit and am just uncomfortable building a php module with Turboactivate and having work completely cross platform with the various versions of Windows / OSx. My product in a lot of ways can't really be pirated as all of the data in program is tied to a specific user but I'm trying to prevent some edge case risks.

I am wondering if there is a way I can activate via an API (my installer supports licenses keys and checking, its Bitrock's installer) and just use the API call to register an activation (and fail if its already registered) and then make another API call to do any de-activations upon uninstalling.

Since this is a PHP application I could store any license features information in an encrypted file that only the PHP application knows how to de-crypt. These PHP files will also be encoded/encrypted using either ZendGuard or IONCube's encoder so no easy way to find the secret key to encrypt my license file.

I do understand the user could copy the license data from one computer to another, but there reports (which are crucial to this product's success) would have the wrong customer's information.

The other option I did get working is an Adobe AIR application that has listens on a socket that my PHP app can make connections to, but that would require additional installer tasks and would require the user running multiple programs to work the software.

Thanks!

I am wondering if there is a way I can activate via an API (my installer supports licenses keys and checking, its Bitrock's installer) and just use the API call to register an activation (and fail if its already registered) and then make another API call to do any de-activations upon uninstalling.

Yes, you can use TurboActivate in your installer. I don't know if BitRock supports dll/dylib/so calls. You'd have to check with them.

The other option I did get working is an Adobe AIR application that has listens on a socket that my PHP app can make connections to, but that would require additional installer tasks and would require the user running multiple programs to work the software.

Yeah you could do that. Or you could call another binary directly.

I decided to try the C app and got pretty darn far, except I can't figure out how to get the license key to come from the command-line arg list (I'm hoping someone can tell me where I am going wrong).

printf("%s: %s\n", "Attempting to use license key", argv[2]);

//product is NOT activated, activate the product.... //STRCTYPE licenseKey = _T("abcdef....."); ///this works

STRCTYPE licenseKey; licenseKey = (STRCTYPE)argv[2]; //this does not work.....

hr = CheckAndSavePKey( licenseKey, TA_USER); Activate();

hr = IsActivated(TA_GUID); if (hr == TA_OK) { printf("%s\n", "Product has been licensed...."); }

You're using ANSI strings (char*) and "casting" them as unicode strings (wchar*). That's wrong. Since you're using commandline arguments you might want to consider using the "unicode main function" on Windows and, on all other platforms, use the regular main function:

#ifdef _WIN32int wmain(int argc, wchar_t *argv[])#elseint main(int argc, char *argv[])#endif{    //your code here    return 0;}

Does that make sense?

Thanks Wyatt! It is all working now!