API RESTful Wiki
An API RESTful in PHP / MySQL which adapts to the content provided
Brought to you by:
homer8173
<form action="https://<?= $_SERVER['HTTP_HOST'] ?>/images/?api_key=<?= MY_AUTH_KEY ?>" method="POST" enctype="multipart/form-data"> <input type="file" name="image" /><br /> <input type="text" name="directory" value="repertoire1" /><br /> <input type="submit" /> </form>
you can setup a directory where the image will be stored
it accepts JPEG GIF and PNG
The POST process return the id of your image
you can access to an image by this kind of url to retrieve the 12th images:
https://api.DOMAIN.com/images/12/?api_key=XXXXXXXXXXXXXXXXXXXXXXXXX
you can resize an image this way:
https://api.DOMAIN.fr/images/1/?api_key=XXXXXXXXXXXXXXXXXXXXXXXXX&width=60&height=60
Hack preventions are correctly made !