mirror of
				https://github.com/ShaYmez/FreeSTAR-Status-Engine.git
				synced 2025-10-26 18:10:21 -04:00 
			
		
		
		
	
		
			
				
	
	
		
			18 lines
		
	
	
		
			580 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			18 lines
		
	
	
		
			580 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
| <?php
 | |
| 
 | |
| if (!file_exists("../config.php")) {
 | |
| 	header("Location: ../");
 | |
| } else {
 | |
| 	require_once("../config.php");
 | |
| 	require_once("../classes/constellation.php");
 | |
| 
 | |
| 	$limit = (isset($_GET['limit']) ? $_GET['limit'] : 5);
 | |
| 	$offset = (isset($_GET['offset']) ? $_GET['offset'] : 0);
 | |
| 	$timestamp = (isset($_GET['timestamp'])) ? $_GET['timestamp'] : time();
 | |
| 
 | |
| 	$result = $constellation->get_incidents((isset($_GET['future']) ? $_GET['future'] : false), $offset, $limit, $timestamp);
 | |
| 	header('Cache-Control: no-cache');
 | |
| 	header('Content-type: application/json');
 | |
| 	echo json_encode($result);
 | |
| }
 |