Permalink
Browse files

Add debug page

  • Loading branch information...
josh committed Mar 1, 2017
1 parent 570933d commit 21ca47176b582784ccd6638a299149af9d39bc3f
Showing with 32 additions and 0 deletions.
  1. +32 −0 debug.php
View
@@ -0,0 +1,32 @@
<?php
include 'overcast.php';
$url = isset($_GET['url']) ? $_GET['url'] : NULL;
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="/css/bootstrap.css">
<link rel="stylesheet" href="/css/site.css">
</head>
<body>
<div class="container">
<form method="GET" action="debug.php" class="input-group">
<input type="text" class="form-control" name="url" value="<?= $url ?>" placeholder="https://overcast.fm/itunes617416468/accidental-tech-podcast">
<span class="input-group-btn">
<button class="btn btn-default" type="submit">Submit</button>
</span>
</form>
<?php if ($url): ?>
<pre><?php
$id = substr($url, strlen("https://overcast.fm/"));
if (substr($id, 0, 1) == "+") {
var_dump(fetchEpisode($id));
} else {
var_dump(fetchPodcast($id));
}
?></pre>
<?php endif; ?>
</div>
</body>

0 comments on commit 21ca471

Please sign in to comment.