Skip to content

Instantly share code, notes, and snippets.

@vinyllicker
vinyllicker / ACR PHP for Cloud Stream
Created August 11, 2018 09:10
Generate Tracks and Artist from ACR Cloud stream monitoring using PHP
//Read json and display title of track using php. This will print the item on your page. I use this in a shortcode via a shortcode plugin.
<?php
json_string = 'https://api.acrcloud.com/v1/monitor-streams/s-bVX73QK/results?access_key=4709cb1d4bf05a8e782034797xxxxxxx';
$jsondata = file_get_contents($json_string);
$obj = json_decode($jsondata,true);
print_r($obj[0]['metadata']['music'][0]['title']);
?>
//Read json and display artist of track using php. This will print the item on your page. I use this in a shortcode via a shortcode plugin.