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

Goto page 1, 2  Next
 
Post new topic   Reply to topic    ionCube Forum Index -> ionCube PHP Encoder

Online Use of PHP Encoder

Author Message
saman_to00



Joined: 27 Aug 2005
Posts: 12

PostPosted: Sat Aug 27, 2005 2:05 pm    Post subject: Online Use of PHP Encoder Reply with quote

Hello,

we are thinking about to purchase ionCube PHP Encoder but we should know some facts we couldn't find in the FAQs or we just didn't find.

Is it possible to use the Functions, like Dynamic Fields and Environment Variables, Dynamic Fields, Automatic archiving, Loader bundling and Dynamic Fields etc. directly online and not local on the PC?

Example:

- We have customers, who can purchase/download PHP Scripts online. Customer gives information like Name, Address etc. Can we add that Information directly online to the encoded files?

- We have different Application-Types for our PHP Scripts, e.g. 10 User Licence 50 User-Licence etc. The customer can choose his Licence-Type, and our Script generates the necessary Code for the chosen Licence Type, so the customer can download the whole application with the online generated files and uses the restricted amount of Users only. Those necessary files, of course, must be created online and directly when the Customer is ordering. Can we encode those Files online with ionCube PHP Encoder, too or do we need to encode files manually on the local machine and upload those files on the Server then? If it's possible, how to do it? Online Library?

Thanks for your help.
Back to top
View user's profile Send private message
liaison
ionCube Support


Joined: 16 Dec 2004
Posts: 2788

PostPosted: Sat Aug 27, 2005 3:48 pm    Post subject: Reply with quote

Hi

For this you would use the standalone Encoder, and you could take advantage of the license file creation support in our latest release, version 6. If you're wanting to dynamically generate license files, but encode locally and so keeping the source files off the server (which is recommended), then the Windows version may be the one to choose. The Windows Encoder comes with both a Windows and Linux license generator, and so you could programmatically use the license file generator on your web server to generate licenses for each user. Please note that we don't currently have a feature to restrict the number of users that can access encoded files, although you might be able to implement that in your scripts yourself, and query a license property via the Loader API to determine the allowed user count. This feature will be added to the licensing system.

If you do wish to add customer information to the header of each encoded file, and this is something that we consider to be a good idea as even though the security of the licensing system is strong, having customer details clearly visible in the top of their scripts is a good deterrent to illegal distribution, particularly publically. In that case, you probably would keep at least some of the files as source and encode on the server, unless you did want to encode them locally. When encoding programatically, dynamic fields isn't relevant as that is a GUI only feature, but you can simply build up whatever command line options you want on the fly and trigger the Encoder when required. Using PHP for this is of course the obvious choice.

There is a system called ionCubicle that may be useful to you, and I believe that Olate have been developing a PHP API to the Encoder.
_________________
Community Admin
Back to top
View user's profile Send private message
saman_to00



Joined: 27 Aug 2005
Posts: 12

PostPosted: Sat Aug 27, 2005 5:12 pm    Post subject: Reply with quote

Thanks for the detailed answer. I hope I got everything right.
We already have implemented the Feature of user-restriction which allows us, to offer various Licence-Types. But that's also the Problem. We need to store source files on the Server, because we dynamically create the Files, which are needed to restrict the Application to limit the access of users. E.g. the customer purchases a 50 User-Licence, we dynamically create the source files to restrict the access to 50 users and we put the rest of the source files for the purchased application and zip them temporary for downloading. But now we want to protect the source code of those files, and we thought we could do that with ionCube PHP Encoder.

So, I don't know if I got this right. Can we encode files dynamically on our webserver without using a local machine/pc?

We just can't encode each product manually, and we are searching for a solution which can help us to make this dynamically on our webserver. BTW, we don't have many possibilities to modify server settings, e.g. we can not access to php.ini or install anything on our webserver etc.
Back to top
View user's profile Send private message
liaison
ionCube Support


Joined: 16 Dec 2004
Posts: 2788

PostPosted: Sat Aug 27, 2005 5:53 pm    Post subject: Reply with quote

Hi

Certainly you can run the Encoder on a web server to encode programatically, and many customers do precisely that. Please note that if you're encoding locally too then you would require two licenses for the Encoder as you would be licensing two machines.

It sounds as though you have a shared server for your web server, and in which case you should check with your host as to whether you can run programs, i.e. the Encoder, on your web server. There may be some restrictions.

If your business can afford it, and with dedicated servers starting at around just $50 per month it's hardly expensive, we really recommend a dedicated server. Shared servers are fine for modest web sites where downtime, potentially poor performance and security breaches aren't an issue, but for any serious business enterprise they can really be a false ecconomy. With your own dedicated server, you have control over everything.
_________________
Community Admin
Back to top
View user's profile Send private message
saman_to00



Joined: 27 Aug 2005
Posts: 12

PostPosted: Sat Aug 27, 2005 6:34 pm    Post subject: Reply with quote

Yes, at the very moment we have only shared server, but we are satisfied. Anyway, we are thinking to get a dedicated server for several reasons. But even if we don't, what kind of requirement would be needed to process server encoding? Isn't there any way to run it on shared servers, servers with restricted administrative possibilities?

Thanks a lot for your help so far.
Back to top
View user's profile Send private message
liaison
ionCube Support


Joined: 16 Dec 2004
Posts: 2788

PostPosted: Sat Aug 27, 2005 6:42 pm    Post subject: Reply with quote

It's going to depend on the server setup, but provided that your host lets you run programs from PHP scripts, it should work. I'd suggest experimenting with the evaluation Encoder on your server.
_________________
Community Admin
Back to top
View user's profile Send private message
saman_to00



Joined: 27 Aug 2005
Posts: 12

PostPosted: Sat Aug 27, 2005 8:12 pm    Post subject: Reply with quote

Ok, I downloaded the evaluation Encoder.

Sorry, I'm new to this. How can I test Server encoding, when I install the Application on a local machine/pc?
Back to top
View user's profile Send private message
liaison
ionCube Support


Joined: 16 Dec 2004
Posts: 2788

PostPosted: Sat Aug 27, 2005 8:33 pm    Post subject: Reply with quote

You must install the software on the web server because that's where you're going to run it. If you have a local master copy of your website that mirrors your live site then you can install locally and develop your PHP scripts to interface with the Encoder, and then replicate the changes onto the live site. The PHP routines that you'll be making use of will be runs such as exec(), system() or passthru().
_________________
Community Admin
Back to top
View user's profile Send private message
saman_to00



Joined: 27 Aug 2005
Posts: 12

PostPosted: Sat Sep 10, 2005 2:26 pm    Post subject: Reply with quote

Hi again,

maybe we will get a VPS or a Dedicated Server, just to run ionCube Encoder directly on our Webserver.

Do you have any piece of advice for this? The possible System for us is a Linux based System, SuSE with Plesk 7.5 Administration etc. Will this work?

Secondly, Iíve searched in vain for an installation instruction for ionCube Encoder on Linux Server. How to do this? Iíve downloaded the Evaluation Version, but I cannot find any installation instruction there.

And how do I use ionCube Encoder dynamically on the Sever? Let's say we have a script which has to be encoded. All source-files lie on our webserver. When the user is ordering our script we generate a file, restricting the script to run with 5 users only. Just for example...

So, how do I call ionCube Encoder to encode my files and zip them e.g. for downloading? I've read the User Guide, but I can see only the Values for Command Lines and not how to use them from a PHP-Script. Do I have to call ionCube Encoder via the Command Line? If yes, how can I call the Command Line from a PHP-Script?

I'm not sure how it works, and I didn't find any tutorials, readme or introduction how to:

- Install ionCube Encoder on a Linux Server
- Call ionCube Encoder from a PHP-Script to encode my source files online

Hope you can help me with that. Thanks a lot in advance.
Back to top
View user's profile Send private message
liaison
ionCube Support


Joined: 16 Dec 2004
Posts: 2788

PostPosted: Sat Sep 10, 2005 3:48 pm    Post subject: Reply with quote

Hi

With version 6, it might be best to Encode locally, perhaps on a Windows machine, and to generate license files remotely. This keeps the source files away from public servers, and where there is always the risk of a security breach. The Windows Encoder comes with a license generator for both Windows and Linux, and you can use the generator on any number of machines.

We don't currently have tutorials on using the Encoder or license generator programatically, but it is something that many people do. In essence, you just need to work out what command line you would use if working at the shell, and then to call the software with the same command line arguments from PHP. The PHP manual has good documentation on executing programs, and the Encoder User Guide covers in great detail all the Encoder and license generator features.

I'd suggest as a starting point to write a simple test script to get yourself familiar with running programs from PHP, and the differences between the various ways of doing this. Once you're comfortable with that, it's only a small step to doing this with products such as the Encoder or license generator.

One thing to note is that the current products don't yet allow restricting the number of users executing scripts, but this will be being added to possibly the Pro Encoder, and certainly to the Cerberus edition.
_________________
Community Admin
Back to top
View user's profile Send private message
saman_to00



Joined: 27 Aug 2005
Posts: 12

PostPosted: Sat Sep 10, 2005 6:07 pm    Post subject: Reply with quote

Thank you.

Ok, I think running Command Line from PHP will be no problem. But how do I setup ionCube Encoder on Linux Servers?

[Edit]: BTW. When I Install ionCube Encoder on a Windows Machine, can I use Command Line aswell, that I can decide if I use GUI or Command Line or both?
Back to top
View user's profile Send private message
liaison
ionCube Support


Joined: 16 Dec 2004
Posts: 2788

PostPosted: Sun Sep 11, 2005 1:18 am    Post subject: Reply with quote

You can use command line on Windows. With Linux, there is no installation required in the same sense as there is on Windows. Just unpack the Encoder archive and go! We'd recommend a location such as /usr/local/ioncube
_________________
Community Admin
Back to top
View user's profile Send private message
saman_to00



Joined: 27 Aug 2005
Posts: 12

PostPosted: Wed Sep 14, 2005 11:38 am    Post subject: Reply with quote

Hi,

I've checked ionCube using cmd with Windows. Works fine. Just one question. I tried to use the following Command:

C:\Programs"ionCube PHP Encoder 6.0 Evaluation"\ioncube_encoder.exe C:\apachefriends\xampp\htdocs\test.php -o D:\encoded.php

I get the error message

Error: You must use -o or --into to specify an encoding target

When I manually change the path in cmd to C:\Programs\ionCube PHP Encoder 6.0 Evaluation and then enter the command

ioncube_encoder.exe C:\apachefriends\xampp\htdocs\test.php -o D:\encoded.php

it works. Maybe I call the command not correctly. Could you help us with that?

Thanks a lot in advance.
Back to top
View user's profile Send private message
liaison
ionCube Support


Joined: 16 Dec 2004
Posts: 2788

PostPosted: Wed Sep 14, 2005 11:45 am    Post subject: Reply with quote

That's interesting. It may be that putting quotes in the middle of the program path has confused the command line parser. Try putting quotes around the whole path, i.e.

"C:\Programs\ionCube PHP Encoder 6.0 Evaluation\ioncube_encoder.exe" C:\apachefriends\xampp\htdocs\test.php -o D:\encoded.php
_________________
Community Admin
Back to top
View user's profile Send private message
saman_to00



Joined: 27 Aug 2005
Posts: 12

PostPosted: Wed Sep 14, 2005 1:45 pm    Post subject: Reply with quote

It works now. Thanks a lot.
I've tried to access an encoded file, but I get the Message:

The file C:\apachefriends\xampp\htdocs\encoded.php has been encoded with the ionCube PHP Encoder and requires the free ioncube_loader_win_5.0.dll ionCube PHP Loader to be installed.

I've encoded in binary mode and the ioncube loader-directory (with all loader variants) lies in the same directory, in which the encoded files lie.

If it helps, I can send you the phpinfo-result (it's a test server and not public to access).

Then, I've searched for the command line parameter to zip encoded files. I didn't find it. Is packing of encoded files not supported with command line?

I'm sorry, that I've so many questions. But we found ionCube Encoder as a perfect solution for encoding, and we are just about to close the testing-phase in the next days. Also calling ionCube via PHP and the command line works very well and encoding dynamically on our webserver will be very effective and time-saving.
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
Goto page 1, 2  Next
Page 1 of 2

 
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