⎗ ✓ 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78<?php $supported_services = [ 'patreon', 'fanbox', 'fantia', 'boosty', 'dlsite', 'gumroad', 'subscribestar' ]; if (empty($_GET["id"]) or !in_array($_GET["service"], $supported_services)) { ?> <html> <head> <title>Kemono.party Artist to RSS</title> </head> <body> <form method="get"> <label for="id"> Kemono Party artist ID: </label> <input type="text" id="id" name="id" required spellcheck="false" > <br> <label for="service"> Service: </label> <select name="service" id="service" required > <option value="">---</option> <option value="patreon">Patreon</option> <option value="fanbox">Fanbox</option> <option value="fantia">Fantia</option> <option value="boosty">Boosty</option> <option value="dlsite">DLSite</option> <option value="gumroad">Gumroad</option> <option value="subscribestar">Subscribestar</option> </select> <br> <input type="submit" value="Build RSS feed"> </form> </body> </html> <?php } else { header('Content-Type: application/rss+xml'); $artistId = $_GET["id"]; $service = $_GET["service"]; $rawResponse = file_get_contents('https://kemono.party/api/' . $service . '/user/' . $artistId . '/'); $responseJson = json_decode($rawResponse, true); ?> <rss version="2.0"> <channel> <title></title> <description></description> <link>https://kemono.party/<?php echo $service; ?>/user/<?php echo $artistId; ?></link> <docs>https://www.rssboard.org/rss-2-0</docs> <?php foreach ($responseJson as $entry) { ?> <item> <title><?php echo $entry["title"]; ?></title> <description><![CDATA[<?php echo $entry["content"]; ?>]]></description> <link>https://kemono.party/<?php echo $service; ?>/user/<?php echo $artistId; ?>/post/<?php echo $entry["id"]; ?></link> <pubDate><?php echo $entry["published"]?></pubDate> <guid><?php echo $service; ?>-<?php echo $artistId; ?>-<?php echo $entry["id"]; ?></guid> </item> <?php } ?> </channel> </rss> <?php } ?>
Warning LINK You are about to visit a link which has been flagged with the above content warnings. Do you wish to continue? Continue Cancel