/ Published in: PHP

interesting app: http://codecanyon.net/item/socialcounter-php-class-social-statistics/282826
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
function get_google_plus1_count($url) { CURLOPT_POST => true, CURLOPT_POSTFIELDS => '[{"method":"pos.plusones.get","id":"p","params":{"nolog":true,"id":"'.$url.'","source":"widget","userId":"@viewer","groupId":"@self"},"jsonrpc":"2.0","key":"p","apiVersion":"v1"}]', CURLOPT_RETURNTRANSFER => true, CURLOPT_SSL_VERIFYPEER => false, CURLOPT_URL => 'https://clients6.google.com/rpc?key=AIzaSyCKSbrvQasunBoV16zDH9R33D88CeLr9gQ' )); if( $res ) { return $json[0]['result']['metadata']['globalCounts']['count']; } return false; }
URL: http://lucido-media.de/blog/php-google-plus-one-count-api
Comments
