Skip to content

A simple API that generates random images in a string build with PHP

License

Notifications You must be signed in to change notification settings

maling-it/simple-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Simple API

this is just generate random image

open the data folder to see what's available

example from public/api/aesthetic.php

<?php 

header("Content-Type: image/jpeg");

$json = json_decode(file_get_contents("../../data/aesthetic.json"),true);
$jumlah = count($json);
$pilih = $json[rand(0,$jumlah-1)];

echo file_get_contents($pilih);

License

GNU GPL v2