This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$client_id = "your client id"; | |
$client_secret = "your client secret"; | |
$redirect_uri = "redirect URI, should be the URL to this PHP file after placed on a web server (e.g. http://localhost:9000/spotify_auth.php)"; | |
if(isset($_GET["code"])) { // return the auth details | |
$ch = curl_init(); | |
curl_setopt($ch, CURLOPT_URL, "https://accounts.spotify.com/api/token"); | |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); |