- Go4up
- API Documentation
API Documentation
- Upload API with PHP example
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 :
user = 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://cache.go4up.com/api/getserver';
$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 protected]',
'pass' => 'password',
'filedata' => '@path_file'
));
$output = curl_exec($ch);
// Do your stuff with content
curl_close($ch);
Requirments
To use the Go4up.com API you need to choose file hosting services you want to upload on in your account : Your account
You can only leech files with direct link, filehost or clouds are not supported.
API
URL : http://go4up.com/api/getserver.php This url will give you the available upload server.
POST VARIABLES :
user = your login email
pass = your login password
url = url of the file you want to leech
OUTPUT DATA :
Error message : <error> ... </error>
Upload success : <link> ... </link>
EXAMPLE :
PHP, CURL use
-
$url = 'http://cache.go4up.com/api/getserver';
$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 protected]',
'pass' => 'password',
'url' => 'http://domain.com/file.ext'
));
$output = curl_exec($ch);
// Do your stuff with content
curl_close($ch);