Company Logo
We specialise in custom cross-platform mobile application development (iOS, Android, Windows), offering Reliable, Scalable and Secure software with a focus on fun and entertainment.


This Site


AppZap

Loads of development teams are having to deal with the app review and app store links in itunes changing a number of times during the lifetime of their apps. For many developers this means they have to re-release their apps after changing hard coded links within the app code.

Avoiding this is reasonably easy, all you need is a website that supports PHP and a couple of minutes to create and deploy the following script:

< ?php

// In the real script remove the space between the < and ? in the above line,

// and make sure that there is nothing above the previous line or the script will not work!

 

// app store re-direct script example 

// written by Tim Teece www.eiientertains.com

// This email address is being protected from spambots. You need JavaScript enabled to view it.

// feel free to use and distribute as long as you keep these comments intact

 

$appname=$_GET['appname'];

$appid=$_GET['appid'];

$command=$_GET['command'];

// protect from url manipulation attacks

$appname = stripslashes($appname);

$appid = stripslashes($appid);

$command = stripslashes($command);

// check which command is being requested

if($command=="apple.review"){

$newUrl="Location:http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?pageNumber=0&sortOrdering=1&type=Purple+Software&mt=8&id=$appid";

header ($newUrl);

 

}else if($command=="apppage"){

$newUrl="Location:http://appstore.com/$appname";

header($newUrl);

}

?>

 

I chose PHP as most web servers will handle it (but you can do the same in .NET/JSP if you want) if you put the script in the root directory of your corporate web server named redir.php you can then code URLs in your app to link to this page and not apple directly. e.g.

Instead of 

http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?pageNumber=0&sortOrdering=1&type=Purple+Software&mt=8&id=508474368

embed in your code:

http://<your web site name>/redir.php?appid=<your app id>&command=apple.review
(e.g. http://eiientertains.com/redir.php?appid=508474368&command=apple.review)
 
and instead of 

http://appstore.com/zombomber

embed in your code:

http://<your website>/redir.php?appname=<your app short name>&command=apple.apppage

(e.g. http://eiientertains.com/redir.php?appname=zombomber&command=apple.apppage)

 

If the URL's in itunes ever change again then all you have to do is change the $newurl= lines in the above script and all your apps will work again without the need to re-release them!

 

Enjoy

 

If you have comments on this script please email This email address is being protected from spambots. You need JavaScript enabled to view it.

 

UPDATE:

 

I have made some changes to this to cope with the new URL's that seem to be causing more problems, my php script now looks like:

$appname=$_GET['appname'];

$appid=$_GET['appid'];

$command=$_GET['command'];

$vers=$_GET['iosversion'];

 

// protect from url manipulation attacks

$appname = stripslashes($appname);

$appid = stripslashes($appid);

$command = stripslashes($command);

$vers = stripslashes($vers);

 

// check which command is being requested

if($command=="apple.review"){

$newUrl="Location:http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?pageNumber=0&sortOrdering=1&type=Purple+Software&mt=8&id=$appid";

header ($newUrl);

}else if($command=="apple.review.iphone"){

$newUrl="";

$versfl=(float)$vers;

if ($vers <6.0){

$newUrl="Location:https://userpub.itunes.apple.com/WebObjects/MZUserPublishing.woa/wa/addUserReview?id=$appid&type=Purple+Software";

}else{

$newUrl="Location:itms-apps://itunes.apple.com/app/id$appid";

}

header ($newUrl);

}else if($command=="apple.apppage"){

$newUrl="Location:http://appstore.com/$appname";

header($newUrl);

}

 

The command apple.review works on iTunes on your desktop/laptop.

The command apple.apppage works on everything

The command apple.review.iphone works on the ipad/ipod/iphone devices but you must supply iosversion. This is because ios6 and above do not (CURRENTLY) support linking directly to the review tab but iOS 5 and below still do via the old URL.

Examples of the URLS to call are:

http://eiientertains.com/redir.php?appname=zombomber&command=apple.apppage

http://eiientertains.com/redir.php?appid=508474368&command=apple.review

http://eiientertains.com/redir.php?appid=508474368&command=apple.review.iphone&iosverison=5.1

http://eiientertains.com//redir.php?appid=508474368&command=apple.review.iphone&iosversion=6.1

You can get the same functionality (i.e. go directly to the application page via the SKStoreKit control but this only works on ios 6 and above)

 



404 Not Found

Not Found

The requested URL /Secure/Stat6/Stat.php was not found on this server.