Answer the question
In order to leave comments, you need to log in
PHP code error when I connect the telegram bot to the site, how to destroy it?
It turns out that I connected a telegram bot that accepts applications from the site.
Everything on this site is working properly.
I then uploaded these files to the customer's hosting . Here is the site and it does not work there.
Here is a file with such errors that I create on the hosting of the customer
[27-Jun-2018 10:21:20 Europe/Moscow] PHP Warning: fopen(): https:// wrapper is disabled in the server configuration by allow_url_fopen=0 in /var/home/k41863/public_html/unique-life.kiev.ua/email.php on line 24
[27-Jun-2018 10:21:20 Europe/Moscow] PHP Warning: fopen(https://[email protected]%0A<b>Тема</b> Cтать владельцем франшизы%0A): failed to open stream: no suitable wrapper could be found in /var/home/k41863/public_html/unique-life.kiev.ua/email.php on line 24
<?php
/* https://api.telegram.org/bot598343425:AAFbHOmQrct_99vpIYdyPpxDZ9TExB-TECM/getUpdates,
где, XXXXXXXXXXXXXXXXXXXXXXX - токен вашего бота, полученный ранее */
$name = $_POST['user_name'];
$phone = $_POST['user_phone'];
$email = $_POST['user_email'];
$theme = $_POST['user_theme'];
$token = "598343425:AAFbHOmQrct_99vpIYdyPpxDZ9TExB-TECM";
$chat_id = "-267401780";
$arr = array(
'Имя пользователя: ' => $name,
'Телефон: ' => $phone,
'Email' => $email,
'Тема' => $theme
);
foreach($arr as $key => $value) {
$txt .= "<b>".$key."</b> ".$value."%0A";
};
$sendToTelegram = fopen("https://api.telegram.org/bot{$token}/sendMessage?chat_id={$chat_id}&parse_mode=html&text={$txt}","r");
if ($sendToTelegram) {
header('Location: thanks.html');
} else {
echo "Error";
}
?>
Answer the question
In order to leave comments, you need to log in
fopen(): https:// wrapper is disabled in the server configuration by allow_url_fopen=0
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question