Cast state to bool to ensure it's always bool
Fixed warning on empty url
Changed spacename to led id
Very simple PHP script that returns a the open or closed status for every hackerspace in the Netherlands in JSON.
Here's a very simple Nginx setup to use with this project if you want to install it yourself:
server {
server_name spaceapi.jiyu.dev;
root /var/www/html/spaceapi;
rewrite \.* /spaceApi.php last;
location / {
include fastcgi_params;
fastcgi_pass unix:/var/run/php/php8.1-fpm.sock;
fastcgi_param SCRIPT_FILENAME $document_root/spaceApi.php;
}
}