PHP code example of chipslays / imgfy-api
1. Go to this page and download the library: Download chipslays/imgfy-api library . Choose the download type require .
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
chipslays / imgfy-api example snippets
use Chipslays\Imgfy\Imgfy;
'potato.png');
print_r($response);
Array
(
[0] => Array
(
[filename] => potato.png
[preview] => https://imgfy.cf/hs7oe
[source] => https://imgfy.cf/file/b49432863e12495ddf099.png
)
)
use Chipslays\Imgfy\Imgfy;
[
'potato.png',
'chips.jpg',
]);
print_r($response);
Array
(
[0] => Array
(
[filename] => potato.png
[preview] => https://imgfy.cf/hs7oe
[source] => https://imgfy.cf/file/b49432863e12495ddf099.png
)
[1] => Array
(
[filename] => chips.png
[preview] => https://imgfy.cf/hs7od
[source] => https://imgfy.cf/file/b39423123e15595dfd019.png
)
)
use Chipslays\Imgfy\Imgfy;
'potato.png', true);
print_r($response);
Array
(
[0] => Array
(
[filename] => potato.png
[preview] => https://imgfy.cf/z:maewitZhZRKPD
[source] => https://imgfy.cf/file/b32166863eaf495ddf079.png
)
)
$response = upload_imgfy('potato.png');
$response = upload_imgfy(['potato.png', 'chips.jpg']);
// super-secretly link
$response = upload_imgfy('potato.png', true);
$response = upload_imgfy(['potato.png', 'chips.jpg'], true);