I am trying to create a licensing system where you have a license key as a variable in a file. Then, it includes a file that's on an external server. The server then does all the validating, and returns whether the key is valid or not. The problem is, an experienced PHP programmer could just remove the include, and change the variable to true. Does anyone know of a way to force a file to be included? I'd like for all the security stuff to be on my server, not my client's.

Here's some of my code:



$serial = "a1b2c3d4e5g6h7i8j9k0";


if($valid == 1) {

//license is valid


else {

//license is not valid





//check with MySQL database to see if license is valid

//if license is valid...

$valid = 1;


$valid = 0;

6 Years
Discussion Span
Last Post by moneeshot

How can you include(<page link on httprotocol>) ????

use codeeclipse dot com
copy paste and get ur file...



I faced (and still face) this issue recently. I sell scripts myself and have learned the hard way that the "call home" in scripts is so useless (unless just used to give shout outs about updates) in everything from stand alones to wordpress plugins. Even obfuscators are breakable when you get down to "experienced programmers" that you speak of.

I would recommend not giving away the script at all. Create a membership based site and have them use the script on your server.

Edited by bloodbender: n/a


get the included files then check that the file is included.
$myFiles = get_included_files();

if that helps at all.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.