php - Can I figure out if a user who downloaded my program actually installed it? -
i made software free download in hopes picks up. paying several affiliates when send me traffic, , way works right give each affiliate unique link, , affiliates credited when software downloaded. however, ideal if track whether user installed software or not. there way without requiring user register software? (keep in mind need know affiliate user referred by)
originally had thought of creating cookie on user's browser affiliate's id, , when software installation complete, open browser show give thanks page, @ point read cookie , figure out affiliate user tied to. however, doesn't work if software downloaded browser other user's default browser....
another thought had storing user's ip address in database, , matching when give thanks page opened, wouldn't work when users part of big network, such @ university.
any suggestions?
another thought had storing user's ip address in database, , matching when give thanks page opened, wouldn't work when users part of big network, such @ university.
send each users' installer personalized name (e.g. binary01, binary02, binary03...). allow installer read own name upon download, , set give thanks page parameter, i.e. http://www.yoursite.com/thankyou?exe=binary03
.
the binary file on server same , 1 file, downloader study different name each affiliate (or can maintain several copies of same binary, that's more hard maintain synced).
for example, download link:
<?php // download url, of form http://www.yoursite.com/download.php?aff=affname // can rewrite apache's mod_rewrite , have .../filename-affname.exe $affiliates = array( // can maintain these in database "widgets" => "widgets'r'us", "foobar" => "foo's software bar", ); $aff = isset($_get['aff']) ? $_get['aff'] : 'unaffiliated'; $base = "yourbinary"; $ext = '.exe'; $file = $base.$ext; $name = $base.'-'.$aff.$ext; header("content-disposition: attachment; filename=" . urlencode($name)); header("content-type: application/force-download"); header("content-type: application/octet-stream"); header("content-type: application/download"); header("content-description: file transfer"); header("content-length: " . filesize($file)); readfile($file); ?>
as how read bundle name, depend on installer. innosetup export info script variable {srcexe}
, advanced installer have [setupexedir], , on.
you may want bump "first install registration" function, though, if happens many users download installation (e.g. @ work, @ net café, etc.) , run later without net connectivity. might want store "installationid" registry value affiliate name upon installation (by reading executable), , programme might , seek exchanging numerical id or uuid if not.
this way best of both worlds, don't annoy client ("cannot install without net connection! yeeech!"), , uuid thrown in bargain.
php cookies
No comments:
Post a Comment