What I want to do is have a normal link for desktop browsers like so:
<div style="text-align: center;">
<a href="http://db.tt/b6ecH2Dh">
<img src="img/download.gif"/>
</div>
But when a iOS user clicks the link it should open a different link like this:
<div style="text-align: center;">
<a href="cydia://package/bla">
<img src="img/download.gif"/>
</div>
Could I do it with JavaScript or PHP? if so how?
EDIT
To do it with javascript, put this script INTO THE OF YOUR HTML DOC
<script type="text/javascript">
if (navigator.userAgent.match(/Mac OS X/i)) {
document.getElementById('down').href="http://www.google.com";
}
</script>
Should work
http://davidwalsh.name/detect-iphone