PHP Classes

PHP uploads.im API class: Upload local or remote files to uploads.im

Recommend this page to a friend!
     
  Info   Example   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 285 All time: 7,553 This week: 78Up
Version Licenses PHP version Categories
uploads-im 1.0.2GNU Free Document...5.0PHP 5, Files and Folders, Web services
Description 

Author

This class can upload local or remote files to uploads.im.

It can send HTTP requests to the uploads.im API Web server to uploads files to the service.

The class can either upload files available on the local machine or files available on another server given the URL of such files.

It returns an array with the results of the upload operation including whether it succeeded, a status message, the URL of the uploaded file in the uploads.im site and a key for deleting the message.

Picture of Amir
Name: Amir <contact>
Classes: 4 packages by
Country: Luxembourg Luxembourg
Age: 38
All time rank: 17022 in Luxembourg Luxembourg
Week rank: 51 Up1 in Luxembourg Luxembourg Up
Innovation award
Innovation award
Nominee: 1x

Example

<?php

require_once dirname(__FILE__) . '/uploadsim.class.php';
$upload = new uploadsim();
$result = $upload->localupload("image.jpg");
if (
$result["status"] = true) {
   echo
$result['url'];
} else {
  
var_dump($result);
}
$result = $upload->remoteupload("http://yoursite.com/image.jpg");
if (
$result["status"] = true) {
   echo
$result['url'];
} else {
  
var_dump($result);
}
?>


  Files folder image Files (2)  
File Role Description
Accessible without login Plain text file example.php Example example script
Plain text file uploadsim.class.php Class class source

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 0%
Total:285
This week:0
All time:7,553
This week:78Up