<?php

$bot_token="7712681015:AAGbAzTvKnOn97pX0SgnGOYbfiP0O_QJuDE";

$tng_conn=mysqli_connect("localhost","verrifyi_unique","verrifyi_unique","verrifyi_unique");

/* LOW BALANCE USERS */

$q=mysqli_query($tng_conn,"SELECT * FROM users WHERE balance<10");

while($u=mysqli_fetch_assoc($q)){

$phone=$u['phone'];
$balance=$u['balance'];

/* FIND TELEGRAM USER */

$t=mysqli_fetch_assoc(mysqli_query($tng_conn,"SELECT * FROM telegram_users WHERE phone='$phone'"));

if($t){

$chat_id=$t['chat_id'];

$msg="⚠️ Low Balance Alert

User Phone: $phone
Current Balance: ₹$balance

Message: Your Balance is low please Recharge

Login URL:
https://newunique.verrify.in/login.php";

/* SEND TELEGRAM */

file_get_contents("https://api.telegram.org/bot$bot_token/sendMessage?chat_id=$chat_id&text=".urlencode($msg));

}

}

echo "Done";

?>