Skip to content

Instantly share code, notes, and snippets.

@vivirenremoto
Last active December 18, 2015 03:49
Show Gist options
  • Save vivirenremoto/5720828 to your computer and use it in GitHub Desktop.
Save vivirenremoto/5720828 to your computer and use it in GitHub Desktop.
Total firefox os app downloads
<?php
// your firefox os apps submissions here https://marketplace.firefox.com/developers/submissions
$app_name = 'betajobs';
$url = 'https://marketplace.firefox.com/app/'.$app_name.'/statistics/installs-month-20120601-'.date('Ymd').'.json';
$dates = json_decode( file_get_contents( $url ) );
$total = 0;
if( $dates ){
foreach( $dates as $date ) $total += $date->count;
}
echo $total;
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment