( ′∀`)σ≡σ☆))Д′)レ(゚∀゚;)ヘ=З=З=Зε≡(ノ´_ゝ`)ノ
<?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', 30000000); //300 seconds = 5 minutes
error_reporting(1);
global $link;
$sql = "select * from profilepicture where (affiliate > 15000 and affiliate < 20182) and catalogid=152 and type=2 and visibility=1 and isdisplay=13 and status=1 and public=1 and is_deleted=0 and params <> 333 order by affiliate desc limit 50,5";
$result = mysqli_query($link, $sql) or die(mysqli_error($link));
while ($row1 = mysqli_fetch_assoc($result)) {
$poster = $row1['poster'];
$original = $row1['id'];
echo $url = "https://www.thebrand.ai/superLayer/processCanvasV2.php?themeid=$original&poster=$poster&snap=yes";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,"$url");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS,
"$jsonData");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$server_output = curl_exec($ch);
$httpcode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close ($ch);
if($httpcode>=200 && $httpcode<300)
{
echo $server_output;
// header("Location: $server_output");
sleep(1);
}
else
{
echo "fail";
}
sleep(1);
}