How to Download the AppStore Top Free iPhone Apps
To download a copy of the current AppStore Top Free iPhone Apps, you can write a script that will do it for you. The script is written in PHP and it will download the complete list of apps as shown through iTunes.
First thing you need to do is set your user-agent string. Apple will detect what browser you are using and if it isn't iTunes, it will try and launch iTunes from your browser.
// Set user agent to iTunes (required)
ini_set('user_agent', 'iTunes/9.0.2 (Macintosh; Intel Mac OS X 10.5.8) AppleWebKit/531.21.8');
Next you will need to specify where you will save the downloaded file.
// Local path to local directory $localPathToSave = './';
Set the path from the App Store to download the file.
// Remote path to iTunes AppStore and path structure $remotePathToAppStore = 'http://ax.itunes.apple.com/WebObjects/MZStore.woa/wa/viewTop?id=25204&popId=27';
This is an optional step so that label the downloaded file the time and date that it was retrieved.
// Get current date and time stamp
$curDateTime = date("Y.m.d.Hi");
Construct the variables that we are going to use for the remote and local file locations.
// Declare paths to files $remoteFile = $remotePathToAppStore; $localFile = $localPathToSave . 'AppStoreTopFreeiPhoneGames.'. $curDateTime . '.html';
Copy the file for the remote location (App Store) to the local location (your server). This is done in a if statement so we can catch any errors that occur in the process.
// Copy remote file to local
if(!@copy($remoteFile, $localFile)) {
$errors = error_get_last();
echo "COPY ERROR: " . $errors['type'] . ' ' . $remoteFile . ' ' . $localFile;
echo "<br />n" . $errors['message'];
}
Optional step to free up memory from some of the memory from the used variables. This would be useful if this was part of a larger script that was downloading multiple files.
// Free up memory by releasing variables unset($remoteFile); unset($localFile); unset($errors);
Download the full code in the Download Code section.
Secrets to the Success of Temple Run on the iPhone
Temple Run has quick turned into the must play game for the beginning of 2012. Anyone who has spent a few minutes with the game will become very addicted very quickly. The game is free but has risen to be the top grossing game in the App Store which has earned the three person development team millions of dollars.
Most App Store developers that I have talked to are very surprised how a simple game like Temple Run can garner so many downloads and profit. I have studied the game and the reactions of users very closely and have discovered quite a few secrets that will help other game developers copy the success of Temple Run. You will be able to model your current projects or future projects to take advantage of the lessons learned from the Temple Runs success.
Secret #1 - Keep the Game Play Simple
Temple Run is a very simple game and has only a few moves that the user needs to master. These moves include swiping right or left, swiping up or down, and tilting the iPhone from side to side. That is it. There are no complicated controls to learn or complex moves to master. You simply swipe up to jump or swipe right to go right.
Secret #2 - Keep the Free Game Free
Releasing a game for free is very difficult for most developers who have spent a lot of time and money in developing a game, but as Temple Run has shown, if done right, it can pay off more than if the game was released paid. Temple Run was actually released as paid in August of 2011, but didn't garner enough sales so it was given away for free and then its sale took off.
The best way to make money off of a free game is to STAY AWAY FROM ADS and monetize In-App Sales. Not everyone is going to make in-app purchases but there are enough people that will so you can make a hefty profit. The most important part of in-app purchases is don't make them a requirement to do well in the game. Too many games almost require in-app purchases in order to beat a game or make any real progress. Most people will feel like the game is really just a paid game but instead of paying to download, you have to pay to play. Temple Run mastered this by allowing the purchased of coins to get power-ups and other extras, but it also allows the free users to obtain a reasonable amount of coins through normal game play. You don't feel like you are missing anything by not buy coins, but also buying coins doesn't give you a tremendous advantage in the game. You will still need to practice like everyone else.
Secret #3 - Competition with oneself and others
Secret #4 - Make it different everytime
Secret #5 - Don't make it hard, but don't make it easy
Secret #6 - Have multiple goals to achieve
Secret #7 - Everything has to work perfectly
Secret #8 - Make it fun to play