Calculation of upgrades using CGI script
auAutoUpgrader component
Would like to calculate the number of upgrades? Then point the InfoFileURL property to the CGI script which will calculate the program upgrades, instead of real Info-file.
Here is an example of such CGI script, in Perl. If you would like to use it just cut and paste this script from here, or download it from http://www.appcontrols.com/misc/autoupgrade-cgi.zip #!/usr/bin/perl
##############################################################################
# Auto-Upgrade counter script Version 1.0 #
# (c) 2000 UtilMind Solutions info@utilmind.com #
# http://www.utilmind.com #
# Created Jan 18, 1999 Last Modified Jan 18, 1999 #
##############################################################################
# COPYRIGHT NOTICE #
# Copyright (c) 1999 by UtilMind Solutions. All Rights Reserved. #
# #
# This program distributed as server side part of AutoUpgrader component. #
##############################################################################
# INSTALLATION TIPS #
# Put this script to your CGI-BIN directory and chmod it to 755 (executable) #
# Create flat database file (users_served.txt) and chmod it to #
# 666 (read-write permission) and install it to CGI-BIN too (see $database #
# variable) #
##############################################################################
####################
# Configuration
$database = "users_served.txt"; # You may set any other name to this flat database
$info_file = "../autoupgrade.inf"; # !IMPORTANT: This is local path to REAL .Info-file
$use_flock = 1; # 1 - yes, 0 - no. Should be used but won't work Win95/98