Skip to content

Instantly share code, notes, and snippets.

View neilmenon's full-sized avatar

Neil Menon neilmenon

View GitHub Profile
import requests
import datetime
def print_log(message: str):
print("[{}] ".format(str( + message)
on_url = ""
html = requests.get(on_url).text
neilmenon / spotify_auth.php
Created December 30, 2022 21:20
Spotify Token Authorization in 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, "");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);