You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
49 lines
1.4 KiB
49 lines
1.4 KiB
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
|
|
<title>Discord song embedder</title>
|
|
<link rel="canonical" href="https://home.pk11.us/song.php">
|
|
<meta property="og:url" content="https://home.pk11.us/song.php">
|
|
<meta property="title" content="Discord song embedder">
|
|
|
|
<?php $song = str_replace(' ', '%20', $_GET['song']); ?>
|
|
|
|
<?php if($song) { ?>
|
|
<meta property="og:audio" content="<?php echo $song ?>">
|
|
<meta property="og:audio:secure_url" content="<?php echo $song ?>">
|
|
<meta property="og:audio:type" content="audio/wav">
|
|
<meta property="og:type" content="music.song">
|
|
<meta name="twitter:player" content="<?php echo $song ?>">
|
|
<meta name="twitter:player:stream" content="<?php echo $song ?>">
|
|
<meta name="twitter:player:stream:content_type" content="audio/wav">
|
|
|
|
<style>
|
|
*, body, html, audio, source {
|
|
margin: 0;
|
|
padding: 0;
|
|
}
|
|
|
|
audio {
|
|
width: 100%;
|
|
height: auto;
|
|
}
|
|
</style>
|
|
<?php } else { ?>
|
|
<meta name="description" content="Put ?song=[link to song] at the end of the URL and Discord will show an embed of that song.">
|
|
<?php } ?>
|
|
|
|
</head>
|
|
<body>
|
|
<?php if($song) { ?>
|
|
<audio controls autoplay>
|
|
<source src="<?php echo $song ?>" type="audio/wav">
|
|
</audio>
|
|
<?php } else { ?>
|
|
<p>Put ?song=[link to song] at the end of the URL and Discord will show an embed of that song.</p>
|
|
<?php } ?>
|
|
</body>
|
|
</html>
|