Last active
June 23, 2017 05:53
-
-
Save attilam/2ce366b867fdfaccd89ac07a87ad2747 to your computer and use it in GitHub Desktop.
Small php script to serve rotonde json feeds
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
header("Access-Control-Allow-Origin: *"); | |
header('Access-Control-Allow-Methods: "GET,POST,OPTIONS,DELETE,PUT"'); | |
$profile = array( | |
"name" => "Attila Malarik", | |
"location" => "Rainy Budakeszi", | |
"color" => "#8872FF", | |
"avatar" => "http://rotonde.attilam.com/Rubinstein.png" | |
); | |
$portal = [ | |
"rotonde.xxiivv.com", | |
"rotonde.monochromatic.co", | |
"rotonde.cblgh.org", | |
"rotonde.anxl.faith", | |
"johnakers.network/rotonde.json", | |
"rotonde.electricgecko.de" | |
]; | |
$feed = array(); | |
// template | |
// $feed[] = ["time" => "", "media" => "", "ref" => "", "text" => "", "url" => ""]; | |
$feed[] = ["time" => "1498197037", "text" => "I hacked up a small php script to generate rotonde json. Next up: some sort of database?", "url" => "https://gist.github.com/attilam/2ce366b867fdfaccd89ac07a87ad2747"]; | |
$feed[] = ["time" => "1498193974", "text" => "I should really create some sort of client instead of adding entries by hand :D"]; | |
$feed[] = ["time" => "1498122876", "text" => "Round and round with Rotonde!", "url" => "https://www.instagram.com/p/BUDI3CPDhM_"]; | |
echo json_encode(["profile" => $profile, "feed" => $feed, "portal" => $portal], JSON_UNESCAPED_SLASHES); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment