Answer the question
In order to leave comments, you need to log in
How to change the address of a blocked telegram server?
I have several sites, applications from them come to the telegram chat. In view of recent events, they have ceased to act. How can I get this site back up and running? you can pay vpn proxy, etc. I'm a little ignorant about this.
<?php
header('Content-type: application/json');
$token = "bot463504725:AAHfhNNz_aJA4iqj59Sa0Nx5EVravRMX8kM1";
$chatid = "-272771015";
$title = $_POST['title'];
$name = $_POST['name'];
$phone = $_POST['phone'];
$mes = $_POST['text'];
$mes2 = $_POST['text2'];
$ip = $_SERVER['REMOTE_ADDR'];
// print_r($_POST);
$msgs =
' '.$title.'
Имя: '.$name.'
☎️ '.$phone.'
Сообщение: '.$mes.'
IP: '.$ip.'
'.$mes2.'';
$messaggio = date('H:i').'
'.$msgs;
$url = "https://api.telegram.org/" . $token . "/sendMessage?chat_id=" . $chatid;
$url = $url . "&text=" . urlencode($messaggio);
$ch = curl_init();
$optArray = array(
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true
);
curl_setopt_array($ch, $optArray);
$result = curl_exec($ch);
echo json_encode(['status' => 'success']);
// echo "1";
?>
Answer the question
In order to leave comments, you need to log in
$optArray = array(
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true
);
Google syntax CURLOPT_PROXY
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question