<?php
// Your data
$your_api              "api_key";
$your_title            "Container title";
$your_comment          "Container comment";
$your_captcha          "yes";
$your_password         "password";
$your_password_redirect "yes";
$your_web              "yes";
$your_dlc              "yes";
$your_cnl              "yes";
$your_password_zip    "";
$your_password_zip_public "";

//To create only one container with some links 
$your_mirrors            = array (
                                        
0=>//cotainer links
                                        
"MIRROR3URL1;MIRROR3URL2;MIRROR3URL3",
                                        
                                );
$backup_links = array();
                                
// To create a Mirror-system (more than 1 mirror):
/*
$your_mirrors            = array (
                                        //mirror_id => mirror links
                                        0 => "MIRROR3URL1;MIRROR3URL2;MIRROR3URL3",
                                        1 => "MIRROR3URL1;MIRROR3URL2;MIRROR3URL3",
                                        2 => "MIRROR3URL1;MIRROR3URL2;MIRROR3URL3"
                                );
*/
/* add backup_links
$backup_links             = array (
                                        //mirror_id =>backups_links
                                        0 => array(
                                                    "BACKUPURL1;BACKUPURL2;BACKUPURL3"
                                                    
                                                  ),
                                        1 => array(
                                                    "BACKUPURL1;BACKUPURL2;BACKUPURL3"
                                                  )
                                );

 */

$data = array(
    
"api" => $your_api,
    
"url" => $your_mirrors,
    
"title" => $your_title,
    
"comment" => $your_comment,
    
"captcha" => $your_captcha,
    
"password" => $your_password,
    
"password_redirect" => $your_password_redirect,
    
"web" => $your_web,
    
"dlc" => $your_dlc,
    
"cnl" => $your_cnl,
    
"password_zip" => $your_password_zip,
    
"password_zip_public" => $your_password_zip_public,
    
"backup_links" => $backup_links 
);

$post_url "http://relink.to/api/api.php";
 
// create a post request
PostRequest($post_url$data);
/*
** The function:
*/
 
function PostRequest($url$_data) {

    
// convert variables array to string:
    
$data urldecode(http_build_query($_data));
    
    
$ch curl_init($url);                                                                      
    
curl_setopt($chCURLOPT_CUSTOMREQUEST"POST");                                                                     
    
curl_setopt($chCURLOPT_POSTFIELDS$data);                                                                  
    
curl_setopt($chCURLOPT_RETURNTRANSFERtrue);                                                                      
                                                                                                         
    
$result curl_exec($ch);
    echo 
$result;
}
?>