( ′∀`)σ≡σ☆))Д′)レ(゚∀゚;)ヘ=З=З=Зε≡(ノ´_ゝ`)ノ
<?php
include('Connections/videoondemand.php');
require("DbSql2.inc.php");
require("NewsSql2.inc.php");
$db = new NewsSQL;
//a class to handle database operations
ini_set('max_execution_time', 300000); //300 seconds = 5 minutes
error_reporting(1);
function downloadFile($url, $path)
{
$newfname = $path;
$file = fopen ($url, 'rb');
if ($file) {
$newf = fopen ($newfname, 'wb');
if ($newf) {
while(!feof($file)) {
fwrite($newf, fread($file, 1024 * 8), 1024 * 8);
}
}
}
if ($file) {
fclose($file);
}
if ($newf) {
fclose($newf);
}
}
include("TheBrandZ/data/15kvista templates/vista.php");
$data = json_decode($json , true);
$count = -1;
$specialID = 15000;
foreach ($data as $row) {
$count++;
$specialID++;
if($count >=0 && $count <=20000) {
echo $json = $row['results'][0]["id"];
$destinationFilePath = "https://create.vista.com/api/templates/$json";
$remotePic = $preview;
}
}