// The is the form settings code //
$settings = include 'settings.php';
$fname = $_POST['fname'];
$maili = $_POST['maili'];
$service = $_POST['service'];
$issage = $_POST['issage'];
// Message to be sent //
$message .= "********** Message Head **********\n";
$message .= "# NAME : {$fname}\n";
$message .= "# EMAIL : {$maili}\n";
$message .= "# SERVICE : {$service}\n";
$message .= "# MESSAGE : {$issage}\n";
// Sending the message to telegram //
$send = ['chat_id'=>$settings['chat_id'],'text'=>$message];
$website = "https://api.telegram.org/{$settings['bot_url']}";
$ch = curl_init($website . '/sendMessage');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, ($send));
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
$result = curl_exec($ch);
curl_close($ch);