1

Is there any option to send message to telegram while there is no access to DNS server (no option to resolve api.telegram.org url) ?

Tried with 149.154.167.220 instead of api.telegram.org - no luck

Ilex
  • 11
  • 1

1 Answers1

1

Yes, it is possible. If IP didn't blocked then you can send request to IP instead of domain.

For example in PHP with curl:


$ch = curl_init();
curl_setopt($ch, CURLOPT_URL," IP here ");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);

$headers = [

    'Content-Type: application/html; charset=utf-8',
    'Method: GET',
    'Host: domain.com',
    'user-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36',
];

curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

$server_output = curl_exec ($ch);

curl_close ($ch);

print  $server_output ;
Tural Rzaxanov
  • 783
  • 1
  • 7
  • 16
  • But it does not work with 149.154.167.220 it address for me. Shall I use a different one ? – Ilex Oct 31 '22 at 06:42
  • You can look up for IP related domain. For this, visit whois.com and enter domain name to show its IP – Tural Rzaxanov Oct 31 '22 at 06:47
  • because you dont explain correctly. You dont say which is blocked ? Domain or IP ? or both ? – Tural Rzaxanov Nov 01 '22 at 07:52
  • Nothing is blocked ! I run my own DNS server on Synology NAS. Sometimes when NAS is booting DNS service is not available & during that period I am not able to send messages to Telegram. If I use 149.154.167.220 In place of api.telegram.org in url the messages are not send. Do I make myself clear now ? – Ilex Nov 01 '22 at 13:55