Ну, если вы можете использовать php для всего, это упростит задачу.Если вы собираетесь использовать php и python, тогда вы берете свой список python, конвертируете его в json и записываете его в файл.
file = open("thejson.json", "w")
towrite = json.dumps(thelist)
file.write(towrite)
file.close()
Затем в php вы открываете файл и конвертируете его вмассив
$json_string = file_get_contents("thejson.json");
$arr = json_decode($json_string, true);
И $ arr - ваш php массив.
По ссылке, которую вы дали:
<?php
define('YES', 1);
define('NO', 0);
$USE_SSL = true;
$api_key = "MY_FILECRYPT_API_KEY";
$name = "My Testfolder";
$group = MyGroupID;
$container_id = MyContainerId;
// Here you grab the json from the file and convert it to an array
$json_string = file_get_contents("thejson.json");
$arr = json_decode($json_string, true);
$mirror_1 = $arr
// --------------------------
$postdata = http_build_query(array(
"fn" => "containerV2",
"sub" => "editV2",
"container_id"=> $container_id,
"api_key" => $api_key,
"name" => $name,
"mirror_1" => $mirror_1,
"captcha" => YES,
"allow_cnl" => YES,
"allow_dlc" => YES,
"allow_links" => NO,
"group" => $group
));
$opts = array('http' => array(
"method" => "POST",
"header" => "Content-type: application/x-www-form-urlencoded",
"content" => $postdata
));
$context = stream_context_edit($opts);
$result = file_get_contents('http'.(($USE_SSL)?'s':'').'://www.filecrypt.cc/api.php', false, $context);
if(!$result) {
throw new Exception("filecrypt.cc api down");
} else {
$json = json_decode($result);
echo "editd container: ".$json->container->link;
}
?>
Это должно работать, но вам придется либо установитьphp или запустите его на php-сервере.
Так что вы будете делать запрос на php.
Для получения дополнительной информации о php здесь есть ссылка: https://www.tutorialrepublic.com/php-tutorial/
Это руководство является хорошим справочником php, на который стоит обратить внимание, если вы застряли.