as the title suggests, I'm having a problem with my Telegram bot. First a few things I want to clarify before i explain my problem. The Bot used to work earlier, received its updates, processed them and sent back a message with the calculated content.
I stopped working on it for a while, and when i worked with it again i got just no response at all. So i tried sending back the complete request to the private channel with my account, which worked. Unfortunately, the request was just empty, no content at all. When i tried to call the Webhook URL manually with some parameters (e.g. ..index.php?hi=owjal&lol=19) they did show up in the request.
What may be of interest is that i'm using the google app engine for my bot, there might be an issue i don't know about. I also noticed when the Bot receives a request from the Telegram-Servers, the php function ip2long returns an incorrect result, for the IP 149.154.167.204 it should return 2509940684, but i got -1785026612 instead, which also(?) turns to 149.154.167.204 . Here some of the code receiving the request sent by Telegram:
index.php
<?php
/**
* @author Tobias Franz
* 07.10.201616:52
*/
include "inc/config.dist.php";
$sender = '';
$sender = $_SERVER['REMOTE_ADDR'];
$senderIP = ip2long($sender);
file_get_contents(API_URL . "sendmessage?chat_id=<myChatId>&text=" . json_encode($_REQUEST).'IP:'.$senderIP);
/* Check if the message is sent by Telegram-Servers */
if ($senderIP <= 2509940713 && $senderIP >= 2509940677) {
I hope you can help me with this issue.
Tobias