Skip to content
A website to view your Spotify stats.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
assets Release on a new domain! Mar 11, 2019
models title update Apr 20, 2019
.gitignore First Commit! May 22, 2018
LICENSE Create LICENSE Jun 21, 2018 Release on a new domain! Mar 11, 2019
artists.php Hover animation Dec 18, 2018
composer.json First Commit! May 22, 2018
index.php Release on a new domain! Mar 11, 2019
logout.php I think we are done! Dec 18, 2018
tracks.php Hover animation Dec 18, 2018

mySpotify - Your Spotify Stats

Over the past few weeks I've been listening to some music, and was interested in which music I've listened to the most. I checked out Spotify's API and noticed there is a way the information, so I went ahead and worked on a program to get the stats for my account and list them out in the most elegant way possible.

Live Preview

You can see a live preview of the website at

What does this do?

It prompts whoever that is visiting the website to authenticate using their Spotify account. Upon them logging into their account a token is sent to the website and saved as a cookie on the users computer. The token allows the website to request information about the users top songs and artists in a period of time, and the stats are printed on a page with images and links to visit the pages.

How do I get it running?

The first step is to head over to the Spotify Dashboard where you can create a new app. You're then given a client and secret token. You can add those including the URL of your website inside of models/configuration.php. So an example of how the file will look like is below:


$_GLOBAL = array(
    'client' => "37c9b2d96x0d47e3b14vef163020zxf9",
    'secret' => "c6a5c0f2122x4b1cab83b6af0de42311",
    'redirect' => "http://localhost/mySpotify/auth.php"


The website also uses Jwilsson's PHP Spotify API Library, you'll also need to install it using Composer with the command below:

composer require jwilsson/spotify-web-api-php

Upon getting that done you're all set to simply login and it should do it's work, enjoy


image image image

You can’t perform that action at this time.