<?php
/*require 'config.php';

date_default_timezone_set('America/Bogota');

$now = date('Y-m-d H:i:s');
$inTwentyMinutes = date('Y-m-d H:i:s', strtotime('+20 minutes'));

$stmt = $db->prepare("SELECT * FROM emails WHERE status = 'pending' AND next_send_time >= ? AND next_send_time < ?");
$stmt->execute([$now, $inTwentyMinutes]);

// Rest of your code...
while ($row = $stmt->fetch()) {
    echo "time is it";
   error_log("time done !");
}*/

$url = "https://ippanel.com/services.jspd";
$rcpt_nm = array('09140790345');
$param = array(
    'uname' => 'u09140790345',
    'pass' => 'Faraz@1355484610792125',
    'from' => '5000404223 ',
    'message' => 'تست',
    'to' => json_encode($rcpt_nm),
    'op' => 'send'
);

$handler = curl_init($url);
curl_setopt($handler, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($handler, CURLOPT_POSTFIELDS, $param);
curl_setopt($handler, CURLOPT_RETURNTRANSFER, true);
$response2 = curl_exec($handler);

$response2 = json_decode($response2);
$res_code = $response2[0];
$res_data = $response2[1];

var_dump($res_data) ;
