2

Possible Duplicate:
Creating a License System

I have an script file (license.php) in a project and I need to know the exact what domain and ip is server is running now. I try too use $_SERVER['HTTP_NAME'] and $_SERVER['SERVER_ADDR'] but it can nulled very easy by renaming license.php to license.org.php and make another license.php file and on that change $_SERVER['HTTP_NAME'] and $_SERVER['SERVER_ADDR'] to a valid license and require license.org.php. so how I can get the real HTTP_NAME and SERVER_ADDR? any solutions?

NOTE: all php files will encrypt by IonCube, so source codes is not available to users.

Community
  • 1
  • 1
IVIR3zaM
  • 567
  • 9
  • 23
  • Can you post code of what you have tried already? – Aamir Oct 15 '12 at 11:49
  • You don't have to use IP address you can use system information such as CPU .... – Baba Oct 15 '12 at 11:50
  • @Baba: I can use mac address, but in many shared hosts shell_exec and all system functions is disabled, so I can't access too mac address or any hardware informations – IVIR3zaM Oct 15 '12 at 11:54
  • 3
    Then use RSA to generate a certificate file .. that would be difficult to cheat .. since you are the only one that has the private key ..... you can also stop support to any software that has been tampered with by using sha1_file to get the current state during installation – Baba Oct 15 '12 at 12:20
  • it's really good if you post some part of your actual working code here, where you're using these variables. Maybe somebody offers you a better way, instead of relying on just two variables for licensing ... – Mahdi Oct 15 '12 at 12:20
  • @Baba: Thanks a lot. it is nice advise too use sha1_file() for my license.php. it can help :-) – IVIR3zaM Oct 15 '12 at 12:25
  • @Mahdi: for security reasons I can't put exact codes here. and this question is only an simple example. anyway Baba have a good Idea :-) – IVIR3zaM Oct 15 '12 at 12:27
  • 2
    @IVIR3zaM have you looked at php code encryption too ??? So many of them out that .... you would definitely not need your software if the client can reverse engineer that – Baba Oct 15 '12 at 12:30
  • @Baba: I use IonCube encoder for many years and didn't any problems until now. I saw it have an decoder in VB language, but that encoder is very bad and only can decode small files. how many safe is IonCube in your opinion? – IVIR3zaM Oct 15 '12 at 12:36
  • @Baba: for reverse engineering my project is safe. cause it is so big, and if somebody can reverse it, he/she can make a similar project like this. – IVIR3zaM Oct 15 '12 at 12:38
  • 3
    @IVIR3zaM just wanted to help, didn't thought it's so secret like that, good luck with that! – Mahdi Oct 15 '12 at 12:38
  • @Mahdi his project could be powering space missions .. you can never tell ... :) – Baba Oct 15 '12 at 12:40
  • @IVIR3zaM what is your distribution plan ... that might even be the solution .... – Baba Oct 15 '12 at 12:40
  • @Baba you mean they're gonna sell PHP web applications to aliens, like thye couldn't null that?! ... Even if you work for Visa, you can always reveal part of code without having anyone abusing that. At least you can change that then post it here. Anyways, people here just want to help, not abusing anyone or any unknown software ... – Mahdi Oct 15 '12 at 12:45
  • @Mahdi ..... `PHP web applications to aliens` .... lol is PHP that alien friendly ..... lol – Baba Oct 15 '12 at 12:48

0 Answers0