var i = 1;
var timerId = setInterval(() => {
if (i == 1000) clearInterval(timerId);
var tpl = `<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
<img src="/foto/${i}.jpg" alt="Картинка №${i}">
</body>`;
download(i + '.html', tpl);
i++;
}, 1000);
function download(filename, text) {
var pom = document.createElement('a');
pom.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(text));
pom.setAttribute('download', filename);
pom.click();
}
то как в ней отобразить строку, для ввода региона и страны, как на том сайте я понятия не имею
$json = '{
"VM_set_PV_args":"",
"VM_set_PV_bootloader":"eliod",
"VM_set_other_config":{
"install-repository":"http:\/\/mirror.yandex.ru\/debian\/",
"install-distro":"debianlike",
"debian-release":"trusty",
"install-arch":"i386"
}
}';
$arr = json_decode($json, true);
echo $arr['VM_set_PV_bootloader'];
foreach ($arr['VM_set_other_config'] as $key => $val) {
echo $val;
}
var key = json[0].device + ' - ' + json[0].id;
<?php
$id = 1;
$arrayName = 'tmpl_' . $id;
global $$arrayName;
($$arrayName)[] = 'string';
var_dump($$arrayName);