Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

svjv1160 / betterplace_project_opinions.php
Last active December 10, 2021 10:02
This snippet shows a simple implementation of API to display project progress on a custom website. The snippet uses PHP Vers. 5.2.0. and does not contain a CSS layout. For further details see API:
/* Your project ID from */
$project = 12345;
/* Get positive opinions (max 100) */
$json = file_get_contents(''. $project.'/opinions.json?facets=score:positive&order=created_at:DESC&per_page=100' );
$obj = json_decode($json);
if($obj->total_entries>0) {
echo '<ul class="positive">';