PHP Installation Tracker

Hi,

I need to know how many users have actually installed and use my PHP product. For this I like to give an option when installing for asking users’ permission.

Is there an already implemented way for tracking installations?

What I was thinking is to have an RSS feed in the product and count number of subscribers.
But that may not provide distinguished installations.

Please add your thoughts…

Thank you…

‘my PHP product’… i assume you mean some package of code.

It wouldnt be foolproof, but… (pseudocode)

if (!file_exists(‘lic.txt’)) {
//Go Get contents of file from your website
//Write a lic.txt
}

and then your website tracks pulls of that page as installs.

Hi StarLion,

Thanks a lot for your solution.

By “My product”, I actually meant a product that I hope to develop.

In your code block, what if we write a unique number for each installation and manage to send a query to tracking site like below time to time.

http://www.example.com/tracker-of-existing-users.php?r3445465rygahgty7

Well i assumed you only wanted to send a single signal on installation.

It… is possible to do… but unless you’re packaging something like *AMP that would control php’s installation, you cant be sure that XYZ configuration is active/possible.

There are ways around it, but without knowing a little bit more about your product i cant answer.

1: Are you in control of PHP’s installation/configuration INSIDE your product
2: Are you using an install page to configure the setup/run database setups/etc etc (ALA every forum software)
3: Do you want a 1-time shot to your server, or a periodic, or…?

Hi StartLion,

My product would be a simple project management tool. It will have a wizard kind of installer that sets up the database and configuration files. But it won’t have control on PHP installation. It will be a set of PHP files packaged together.

I may create an EXE with an AMP stack for Windows users. But I guess main product (File archive) will have more exposure.

I would like a periodic tracker. But if it is not possible, even one time signal is fine.

Thanks.

Store a timestamp in the database somewhere (part of the config table, preferably)… part of pulling your config on pageload will be to check if the timestamp is more than <periodoftime> seconds old. If so, set the timestamp to time(), then have the server reach out and touch (file_get_contents, curl, ftp? depends on the setup what works and what doesnt) your server. Your server may want to filter that a little bit more (Ignore multiple signals from the same server at the same rough timeframe, to prevent overlap)