No registration required.
Like our service? Buy us a beer!
Question? Email us at zoomable1@gmail.com
https://srv2.zoomable.ca/api/image
Upload a new image.
Key | Required | Description |
---|---|---|
image | required | A binary file. (up to 30MB, JPG or TIF) |
<?php
$filename = 'filename.jpg';
$filetype = 'image/jpeg';
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://srv2.zoomable.ca/api/image",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => array('image' => curl_file_create($filename, $filetype, $filename)),
CURLOPT_HTTPHEADER => array(
"cache-control: no-cache",
"content-type: multipart/form-data;",
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
https://srv2.zoomable.ca/api/image/{{imageHash}}
Get information about an image.
<?php
$id = '{{imageHash}}';
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://srv2.zoomable.ca/api/image/" . $id,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => array(
"cache-control: no-cache",
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}