PHP code example of cookieguru / googlemusicsearch

1. Go to this page and download the library: Download cookieguru/googlemusicsearch library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

cookieguru / googlemusicsearch example snippets



$api = new \cookieguru\googlemusicsearch\API();
$api->setUserAgent('Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:66.0) Gecko/20100101 Firefox/66.0');
$api->verifyPeer(false); //This line may not be needed in your situation
$results = $api->search('Wezz Devall feat. Alana Aldea - On The Rise (Original Mix)');
print_r($results[0]);