<meta name="description" content="Simple form for entering a Spotify playlist and returning a list ranked by popularity score">
</head>
<body>
<form action="" method="GET">
<p><strong>Enter a Spotify playlist URL:</strong> <input name="URL" id="URL"></p>
<p><button>Submit</button></p>
</form>
<p>Pro-tip: this is secretly a TSV spreadsheet for you nerrrrds</p>
<br/>
<?php
if($_GET['URL']){
$url=$_GET['URL'];
if(filter_var($url,FILTER_VALIDATE_URL)===FALSE){
die("Sorry, only valid URLs are currently supported. Take it up with Keith! He probably just forgot to make URIs work too. Or maybe what you pasted in isn't valid as either...");
}
# Run Python script (should rewrite in PHP sometime...)