API doc

From Go4up
Jump to: navigation, search

Go4up API

\* The go4up.com's API is available only for registered users */


Requirments

To use the Go4up.com API you need to choose file hosting services you want to upload on in your account : Your account


API

URL : http://go4up.com/api/getserver.php This url will give you the available upload server.


POST VARIABLES :

  • email = your login email
  • pass = your login password
  • filedata = file you want to upload


OUTPUT DATA :

  • Error message : <error> ... </error>
  • Upload success : <link> ... </link>


EXAMPLE :

PHP, CURL use

$url = 'http://go4up.com/api/getserver.php';
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_FRESH_CONNECT, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$server_url = curl_exec($ch);
curl_close($ch);
$url = $server_url;
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_FRESH_CONNECT, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, array(
'user' => 'email@email.com',
'pass' => 'password',
'filedata' => '@path_file'
));
$output = curl_exec($ch);
// Do your stuff with content
curl_close($ch);
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox