Deezer API: Search result is empty

2019-03-01 01:06发布

I've got a problem. I'm making something with the Deezer api. When I try to search with the api I'm always getting an empty result.

To test it I'm using this code:

<?php
echo file_get_contents('https://api.deezer.com/2.0/search?q=Avicii');
?>

When I visit the url in my browser it works fine. But when I visit the PHP-file it outputs:

{"data":[],"total":0}

I'm also getting data from a Deezer playlist and that works fine! I searched the web for it but I've got no idea what's wrong.

Thanks in advance!

标签: php api deezer
0条回答
登录 后发表回答