first commit
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
// Serve up blog posts like they're going out of style
|
||||
// No authentication, no rate limiting, just pure chaos
|
||||
header('Content-Type: application/json; charset=utf-8');
|
||||
header('Access-Control-Allow-Origin: *'); // We're generous like that, or just naive
|
||||
|
||||
$postsFile = __DIR__ . '/../data/posts.json';
|
||||
if (file_exists($postsFile)) {
|
||||
readfile($postsFile); // Straight from the source, no middleman, no safety net
|
||||
} else {
|
||||
http_response_code(404);
|
||||
echo json_encode(['error' => 'Posts not found']); // The void stares back, and it's hungry
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user