Forgot password

API How-To


Introduction
Welcome to Multiupfile Application Programming Interface (API) beta, which allows you to embed Multiupfile.com services in your applications, programs, or scripts.
The Multiupfile API (beta) service is provided "as is," with no warranties whatsoever. Improvements and new features are always being made. However, we will make all changes as backwards compatible as possible.

Start
The API is based on simple POST-Actions and all responses return a JSON object. See the single actions for paramters, return results and documentation.

General

  • List files

  • http://www.multiupfile.com/api/listfiles

    Parameters:
    (string) username
    (string) password (as md5-hash)
    [optional](int) offset
    Result:
    #List latest 100 files (offset = 0)
    (string) filename => File name
    (string) filesize => File size in bytes
    (string) time => Time upload (UTC)
    (string) url => URL of file
    (int) views => Number of views
  • Get file server

  • http://www.multiupfile.com/api/upload

    Parameters:
    [optional](string) username
    [optional](string) password (as md5-hash)
    Result:
    (string) fileserverurl => URL for file upload
    (string) fid => File id
    (string) key => Hash key
    (int) userid => Userid
  • Hosts

  • http://www.multiupfile.com/api/hosts

    Parameters:
    null
    Result:
    #List all hosts support
    (int) hostid => Host ID
    (string) hostname => Host name
    (int) maxsize => Max file size guest
    (int) maxsizemember => Max file size member
    (boolen) requireaccount => Require account to upload
  • Upload files to server

  • POST => [fileserverurl]

    Parameters:
    (string) fid
    (string) key
    (int) userid
    (array) hostid
    (file) ifile1
    [optional](file) ifile2, ifile3, ifile4, ifile5
    #List hosts detail here
    Result:
    (string) url => Regular download link
Sample Upload Script
This is a sample PHP upload script. Just plug in your username and password, and its ready to go.

$local_file = "/path/to/localfilename.avi"; 
$file_name = "filename.avi"; 

$post['username'] = 'demo';
$post['password'] = md5('demopassword');
// Do Curl Request
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,'http://www.multiupfile.com/api/upload');
curl_setopt($ch, CURLOPT_POST,1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$page=curl_exec ($ch);
if(curl_errno($ch)) {
	die('Error: ' . curl_error($ch));
}
curl_close ($ch);
preg_match('/{(.*)}/', $page, $page);
$code = json_decode($page[0]);
if ($code->userid == 0) echo 'Error login, upload anonymous';
else echo 'Login success, Upload as '.$post['username'];
$fpost = array (
	'fid' => $code->fid,
	'key' => $code->key,
	'userid' => $code->userid,
	'ifile1' => '@'.realpath($local_file).';filename='.$file_name,
	'hostid[1]' =>  '2', //Depositfiles.com
	'hostid[2]' =>  '3', //Zippyshare.com
	'hostid[3]' => '10', //Ziddu.com
	'hostid[4]' => '15', //Crocko.com
	'hostid[5]' => '17', //Uploaded.net
	'hostid[6]' => '38', //Bitshare.com
	'hostid[7]' => '60', //Load.to
	'hostid[8]' =>'118', //Uploadable.ch
);
// Do Curl Upload
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$code->fileserverurl);
curl_setopt($ch, CURLOPT_POST,1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $fpost);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$upfiles=curl_exec ($ch);
if(curl_errno($ch)) {
	die('Error: ' . curl_error($ch));
}
curl_close ($ch);                      
preg_match('/{(.*)}/', $upfiles, $upfiles);
$ufile = json_decode($upfiles[0]);
echo $ufile->url;
Hosts support | API | Terms of Service | Report Abuse| FAQ| Contact
Copyright © 2017 by MultiUpfile.com