View Full Version : Licensing system
Master Merlin 03-28-2010, 01:58 PM Greetings,
I wonder if you know some remote licensing system I could use to track the usage of my php scripts.
I'd like to
Offer the scripts freely however I want to add a tracking code to the scripts so each time the script is installed on a webserver it contacts my remote licensing webb application and gives me the url where the script has been installed.
Best Regards,
Merlin
lonea 03-28-2010, 02:16 PM whmcs + licensing module
spbas
Master Merlin 03-28-2010, 02:26 PM Nah, I don't need a billing solution.
lonea 03-28-2010, 02:27 PM you dont need to use the billing portion
Master Merlin 03-28-2010, 02:33 PM I don't want my customer to SIGN in or register on a system. I only want the thing to track the url of the installations ...
Just do something like send a $POST to a PHP page on your server, that then puts the URL in a database or something...
tim2718281 03-28-2010, 06:06 PM Greetings,
I wonder if you know some remote licensing system I could use to track the usage of my php scripts.
I'd like to
Offer the scripts freely however I want to add a tracking code to the scripts so each time the script is installed on a webserver it contacts my remote licensing webb application and gives me the url where the script has been installed.
Best Regards,
Merlin
How about including a "setup" script that tells the user you're doing that, and invites them to add any personal details they wish (eg an optional email address so you can notify them of any serious bugs.)
Master Merlin 03-31-2010, 01:46 PM Well, the fact is I don't want them to know about the tracking system.
tim2718281 03-31-2010, 02:02 PM Well, the fact is I don't want them to know about the tracking system.
Oh, OK; but you realise some people will then think you're are distributing some kind of malware.
xtrac568 03-31-2010, 02:03 PM You can implement something simple like curl http get/post callback to tracking script on your server.
Then use ioncube or some other encrypting software to encrypt that portion of the code so it cannot be removed or seen.
Master Merlin 03-31-2010, 02:07 PM Yeah but I don't know how to implement a callback tracking code to my server :(.
xtrac568 03-31-2010, 02:13 PM // create a new cURL resource
$ch = curl_init();
// set URL and other appropriate options
curl_setopt($ch, CURLOPT_URL, "http://www.example.com/");
curl_setopt($ch, CURLOPT_HEADER, 0);
// grab URL and pass it to the browser
curl_exec($ch);
// close cURL resource, and free up system resources
curl_close($ch);
Then you can track callbacks on your webserver logs or pass the CURLOPT_URL to some php script where you do tracking.
For more curl opts see, http://www.php.net/manual/en/function.curl-setopt.php
Master Merlin 03-31-2010, 02:32 PM I will look into it thanks. Pitty there isn't a ready-made application for this.
mattle 03-31-2010, 03:35 PM Couple of thoughts here:
1. How is it that you are developing PHP scripts for people to install and use, but can't figure out a fairly simple task like this? That really calls into question the quality of the applications you're distributing.
2. It's pretty shady to have a registration that's (a) not optional and (b) not disclosed to the end user. Perhaps the reason you can't find a ready-made solution here is because it's really bad form to do what you want. I'd go a step farther than Tim here: I don't think that anything that instantiates an unauthorized/unknown connection upon installation is malware; it is malware.
Master Merlin 03-31-2010, 05:02 PM 1) I figured the script out and it is working but it doesn't do all what I'd like it to do however it'll be fine
2)And I am afraid it is not a malware as long as the user is notified about it in the Terms of Service and User Acceptance Policy.
mattle 03-31-2010, 06:10 PM Well, the fact is I don't want them to know about the tracking system.
I am afraid it is not a malware as long as the user is notified about it in the Terms of Service and User Acceptance Policy.
Which is it?
linux-tech 03-31-2010, 06:27 PM Keep in mind using the curl option will require php to be compiled with curl enabled. Not a bad idea, but not going to work on 100% of hosts.
Master Merlin 04-01-2010, 07:21 AM Any way to avoid using curl?
fremio 04-05-2010, 02:30 PM 1) I figured the script out and it is working but it doesn't do all what I'd like it to do however it'll be fine
2)And I am afraid it is not a malware as long as the user is notified about it in the Terms of Service and User Acceptance Policy.
<?php
$script = "http://link.to/your_notifier.php"; //script to send information to
$params = "?";
foreach($_SERVER as $k => $v) { //this goes through all the $_SERVER variables, any information you could ever want to know
$params .= ''.$k.'='.$v.'&';
}
$params .= "ender=NULL";
$params .= "&name=$name"; //any other info youd want to pass along
$result = file_get_contents($script.$params);
?>
If you use that script, it will post all server variables to your specified script, which includes anything you'd to know about that server as well as other custom variables you can include.
On your end you'd access the variables as $_POST['VAR_NAME'] (where they were originally $_SERVER['VAR_NAME']).
Master Merlin 04-06-2010, 03:07 PM Thank you.
|