-
Notifications
You must be signed in to change notification settings - Fork 2
Home
s3ij1nn edited this page Nov 4, 2020
·
4 revisions
Welcome to the 1fichier API wiki!
get from https://1fichier.com/console/params.pl and generate API KEY
All function need "Premium, Access, CDN" user.
API https://1fichier.com/api.html
- ftp upload
- file download (direct link generator function is included)
- Files change attributes
- rename [TODO]
- If you list the files with "\" in file names, NULL is returned depending on the relationship of php (json_encode).
- fichier::download() Once you make a request, you will not be able to make requests from another IP address for a while.
download("https://1fichier.com/?dkslakjflasf");
=> [
"message" => "Only 1 location allowed at a time #887",
"status" => "KO",
]
require 'vendor/autoload.php';
$o = new \onefichier\fichier("sJr******************");
generate download link
$o->download('https://1fichier.com/?**************');
=> [
"status" => "OK",
"url" => "https://a-4.1fichier.com/**********",
]
Get file list.
$o->file_ls(0)
=> [
"status" => "OK",
"items" => [
[
"acl" => 0,
"size" => 7*****,
"checksum" => "*****************",
"cdn" => 0,
"pass" => 0,
"content-type" => "application/epub+zip",
"filename" => "*****************",
"url" => "https://1fichier.com/?*********",
"date" => "2019-01-02 08:37:23",
],
],
"count" => 1,
]
Get file info.
$o->file_info('https://1fichier.com/?***********');
=> [
"folder_id" => 0,
"filename" => "**********",
"content-type" => "application/epub+zip",
"url" => "https://1fichier.com/?***********",
"checksum" => "********",
"path" => "",
"acl" => "",
"pass" => 0,
"description" => "",
"cdn" => 0,
"date" => "2019-01-02 08:37:23",
"size" => 7*****,
"inline" => 0,
]
1fichier AntiVirus Scan.
$o->av_scan('https://1fichier.com/?*************');
=> [
"date" => "2019-01-14 15:12:21",
"status" => "OK",
]
remove file
$o->file_rm('https://1fichier.com/?5*****r');
[
"urls" => [
"https://1fichier.com/?5*****r",
],
"status" => "OK",
"removed" => 1,
]
$o->file_rm(['https://1fichier.com/?v**************p','https://1fichier.com/?w**************1']);
=> [
"urls" => [
"https://1fichier.com/?v**************p",
"https://1fichier.com/?w**************1",
],
"removed" => 2,
"status" => "OK",
]
$o->file_mv('https://1fichier.com/?v**************p', 114514)
Upload file(web api)
$o->upload_file('/etc/var/www/html/index.html');
=> [
"links" => [
[
"whirlpool" => "b01ce2f938401b8e78fa1ee2d927c5d4430d21bf875827222ba92b4490a8b4e3fc6bdd6e97f67cc87076a99e5f46d22a9904001d5c17b68a7a99b1aceae3acfc",
"filename" => "composer.json",
"download" => "https://1fichier.com/?an66rrs9hw5hwbma8c9a",
"size" => "177",
],
],
"incoming" => 0,
]