<?php
// Your data
$your_api              "api_key";
$container_id "container_id";
$your_title            "new title";
$your_comment          "_empty_"// _empty_ removes the old comment. To ignore and keep old comment remove _empty_. To overwrite enter your new comment.
$your_captcha          "yes"// Activate Captcha yes/no
$your_password         "_empty_"// Visitor password to access the container
$your_password_redirect "yes"// To gain more income, redirect your visitor to password page. yes/no
$your_web              "yes"// Activate WEB-Container yes/no
$your_dlc              "yes"// Activate DLC-Download yes/no
$your_cnl              "yes"// Activate ClickNLoad yes/no
$your_password_zip    "_empty_"// _empty_ removes old zip password. To ignore enter "". To overwrite enter your new zip password.
$your_password_zip_public ""// Show zip password for visitor yes/no


$your_mirrors            = array (

//Note: In crypt mode you can create a mirror system. Each Mirror ID will create a container.
//To edit one of this container use always mirror_id 0.

                                        //mirror_id => container links 
                                        
=> "http://URL1;http://URL2;http://URL3",
                                        
                                );
// if you do not want update the container urls please uncoment the following line

//$your_mirrors = "";

$backup_links             = array (
                                    
                                        
//mirror_id =>backups_links
                                        
=> array(
                                                    
"http://BACKUPURL1;http://BACKUPURL2;http://BACKUPURL3",
                                                
                                                  )          
                                    
                                );

// if you do not want update the backup urls please uncoment the following line

//$backup_links   = "";

$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,
    
"container_id" => $container_id,
);

$post_url "http://relink.to/api/container_edit.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;
}
?>