On the Ground Control website I wanted to make the download of ground control a little more picky about it’s default method of installation on the front page. While the download page contains all methods possible and I’m not too bothered about letting people pick and choose there, I did want to present the user with the best option by default.
So since I’m using SSI for this website (quick, dirty and supported on everything) I used a couple of conditional statements which check the Agent string and present one of the following options:
The Install Now link is actually and apt url which installs ground control from their repository, which is useful if your using lucid or if you already have the ppa installed, but a bit pointless for anyone else. So everyone else gets different links.
Obviously I’m aware that user agent strings are likely to be incorrect in certain ways, but I’m prepared to say that if your using a false user agent for all websites, then you should expect these kinds of things.