Skip to content

Instantly share code, notes, and snippets.

@mgng mgng/result.html
Created Nov 26, 2012

Embed
What would you like to do?
soundcloud api で検索
<a href="http://soundcloud.com/buleus/meshuggah-bleed">Meshuggah - Bleed</a><br />
<a href="http://soundcloud.com/isitreal/meshuggah-grin">Meshuggah grin</a><br />
<a href="http://soundcloud.com/generaleramon/meshuggah-preset">Meshuggah Preset</a><br />
<a href="http://soundcloud.com/godeyeam/meshuggah-obzen">Meshuggah - ObZen</a><br />
<a href="http://soundcloud.com/metal/meshuggah-bleed">Meshuggah - Bleed</a><br />
<a href="http://soundcloud.com/ruairiau/meshuggah-combustion">Meshuggah - Combustion</a><br />
<a href="http://soundcloud.com/t-bag-2/meshuggah-clips">Meshuggah Clips</a><br />
...
...
<?php
require_once '/path/to/php-soundcloud-master/Services/Soundcloud.php';
$soundcloud = new Services_Soundcloud( 'YOUR_CLIENT_ID' );
$soundcloud->setCurlOptions( array(
// via http://curl.haxx.se/ca/cacert.pem
CURLOPT_CAINFO => '/path/to/cacert.pem'
) );
// via http://developers.soundcloud.com/docs/api/reference#tracks
$filters = array(
'q' => 'meshuggah',
//'genres' => 'death metal',
//'license' => 'all-rights-reserved',
);
$tracks = json_decode( $soundcloud->get( 'tracks', $filters ) );
foreach( $tracks as $track ) {
echo "<a href=\"{$track->permalink_url}\">{$track->title}</a><br />\n";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.