Skip to content

Instantly share code, notes, and snippets.

Created December 30, 2013 15:43
What would you like to do?
Extract FeedPress subscribers count from JSON file
function get_feedpress_subscribers($url) {
$json_string =file_get_contents($url);
$json = json_decode($json_string, true);
return ( intval( $json['graph']['datasequences'][0]['datapoints'][0]['value'] ) + intval( $json['graph']['datasequences'][1]['datapoints'][0]['value'] ) );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment