“iTunes APItizer” Documentation by “Rudolf Hattenkofer” v1.0


“iTunes APItizer - bringing the AppStore to your PHP”

Created: 20.02.2011
By: Rudolf Hattenkofer
Email: info@geardev.de

Thank you for purchasing iTunes APItizer. If you have any questions that are beyond the scope of this help file, please feel free to email via my user page contact form here. Thanks so much!


Table of Contents

  1. Quick Start Guide
  2. Files
  3. Style
  4. More

A) Quick Start Guide - top

To include e.g. the Remote app made by Apple, you have to follow these simply steps:

  1. Include the PHP class:
  2. 	<?php
    	include 'appstoreapi.php';
    
  3. Then we have to initialize the class and pass the ID of the app to it.
  4. 	$myapp = new App( 284417350 );
    
  5. Provided that we only want to output everything in a human readable form, we finally write:
  6. 	$myapp->output();
    

What gives us the following code:

	<?php
	include 'appstoreapi.php';
	$myapp = new App( 284417350 );
	$myapp->output();
	?>

That's all you have to do for giving users an overview of your app:

Remote Seller: AppleĀ® Rating: 4+ Price: Free Download


B) Files - top

Just a quick overview of all files delivered with this archive:


C) Style - top

If you're a bit more advanced in programming you probably noticed that I modified the style in the upper example. e.g I. modified the behaviour of links so they are only underlined if the user hovers over a link with the mouse. To do so, simply edit style.php like that (notice the last few lines):

	<?php
	$style = '<style>
	.app {
		font-family: Arial, Helvetica, Geneva, sans-serif;
	}
	.app .title {
		font-size: 13px;
		font-weight: bold;
	}
	.app small {
		font-size: 10px;
	}
	.app span {
		font-size: 13px;
		display: block;
	}
	.app .desc {
		font-size: 14px;
	}
	.app .iconcontainer {
		position: relative;
		margin: -2px 5px 0 0;
		width: 65px;
		float: left;
	}
	.app .iconcontainer .mask {
		position: absolute;
		top: 0;
		left: -1px;
		height: 63px;
		width: 62px;
		z-index: 1;
		display: block;
		background-image: url("'.$shadow.'");
	}
	.app .iconcontainer img {
		height: 60px;
	}
	.app a {
		text-decoration: none;
	}
	.app a:hover {
		text-decoration: underline;
	}
	</style>
	';
	?>

So it's really very easy to customize the look of the output just like you want, with a bit knowledge of CSS. But never ever edit the last three or the first two lines, or the sky will fall on your head!


D) More - top

Of course you can't only output all informations of an app with iTunes APItizer. You can also access any property individually to display just what you want the customer to know. E.g. in case you want to inform your visitors about the current price of your app, you go like this:

	The current price of <?php echo $myapp->title(); ?> by <?php echo $myapp->seller(); ?> is: 
	<?php echo $myapp->price(); ?>

that will result this:

	The current price of Remote by AppleĀ® is: Free

Below I provide you a piece of code that is a bit more advanced, which will generate a number of images with all the app screenshots.

	<?php
	$screenshots = $myapp->screenshots( 'iphone' );
	foreach( $screenshots as $count => $screenshot ) {
		echo '<img src="'.$screenshot.'" alt="Screenshot'.$count.'" />';
	}
	?>

Of course if you have a retina-supporting app like Remote, the images will be much too big now. To solve this, we simple add width="200" after the "img":

	<?php
	$screenshots = $myapp->screenshots( 'iphone' );
	foreach( $screenshots as $count => $screenshot ) {
		echo '<img width="200" src="'.$screenshot.'" alt="Screenshot'.$count.'" />';
	}
	?>

And that's it :) Your visitors are now always up to date about your apps price, can look at some screenshots and you save a bit traffic because they're hosted at Apples servers. Of course you can do much much more with iTunes APItizer, there is a list with all of the functions on my website at GearDev.de/codecanyon.php.


Once again, thank you so much for purchasing iTunes APItizer. As I said at the beginning, I'd be glad to help you if you have any questions relating to iTunes APItizer. No guarantees, but I'll do my best to assist. If you have a more general question relating to iTunes APItizer on CodeCanyon, you might consider visiting the forums and asking your question in the "Item Discussion" section.

Rudolf Hattenkofer

Go To Table of Contents