A QR code is just a link / URL, soo point to a URL on your site and use PHP to determines if the user is using Android or iPhone. Then do a PHP header location to the iPhone app URL if it is iPhone, or Android app if it is Android.
Here is the PHP code:
<?php
**//Handy Code Provided by STEPHENCARR.NET**
$iPod = stripos($_SERVER['HTTP_USER_AGENT'],"iPod");
$iPhone = stripos($_SERVER['HTTP_USER_AGENT'],"iPhone");
$iPad = stripos($_SERVER['HTTP_USER_AGENT'],"iPad");
$Android= stripos($_SERVER['HTTP_USER_AGENT'],"Android");
//check if user is using ipod, iphone or ipad...
if( $iPod || $iPhone || $iPad ){
//we send these people to Apple Store
header('Location: http://www.example.com/'); // <-apple store link here
}else if($Android){
//we send these people to Android Store
header('Location: http://www.example.com/'); // <-android store link here
}
**//Handy Code Provided by STEPHENCARR.NET**
?>