views:

48

answers:

2

Hi,

I'm currently hosting an Eclipse plugin update site on sourceforge.net . SF.net does not allow access to server logs but I'd still like to know how many downloads the plugin gets.

Is there an alternative way of gathering them?

I'm not going to have any sort of 'call home' feature in the plugin, so please don't suggest that.

A: 

Just a thought: AFAIK, SourceForge does tell you how much data you served. You know the size of your plugin JARs. Divide the data served by the size of your plugin and you get a rough estimate of how many downloads you had.

zvikico
+1  A: 

It is possible to host the plugin jars in the file release service, and then get your site.xml file to point to them. You need to point at a specific mirror to make it work.

This will tell you how many times people download each file as with a normal file release.

Unfortunately, in practice this is a lot of work to maintain, and tends to be unreliable (I kept getting bug reports saying the update site wasn't working).

You could write a very simple php script which just serves up the relevant file, and logs the download to a file or DB. Make sure it double checks the URL is a valid one to download to the user of course :)

Once that's in place, you can update the site.xml to point to the correct thing, or you could probably use URL rewriting to intercept requests to your jar file and pass them through the script. I've never tried that on the SF servers, but it might work.

EDIT: Even better, just have a php script which sends a redirect like this:

<?php
  $file = $_GET('file');

  // Now log the access to file

  header('Location: ' . $file);
?>
Mike Houston
That's a nice idea, thanks.
Robert Munteanu