Telegram Bots und Synology

https://localhost/telegram.php?user=1&pass=1&phone=010&body=Hello World&bot_token=TOKEN_API_STRING&chat_id=CHAT_OR_USER_ID

Die Chat ID beginnt mit einem minus zeichen userID’s sind ohne

Die User bzw Chat ID findet man dann wie folgt raus:

https://api.telegram.org/botTOKEN_API_STRING/getUpdates

telegram.php mit folgendem Inhalt auffüllen:

 

<?php
header("Content-Type: text/html; charset=utf-8");

define('BOT_TOKEN', $_GET["bot_token"]);
define('API_URL', 'https://api.telegram.org/bot'.BOT_TOKEN.'/');

// grab the chatID
$chatID = $_GET["chat_id"];

// … Continue reading

CentOS Proxy

System-wide proxy settings – add the following lines to your /etc/environment file:

# vi /etc/environment

http_proxy="http://proxysrv:8080/"
https_proxy="https://proxysrv:8080/"
ftp_proxy="ftp://proxysrv:8080/"
no_proxy=".mylan.local,.domain1.com,host1,host2"

To apply these settings without restarting the machine run the following commands on the bash shell:

export http_proxy="http://proxysrv:8080/"
export https_proxy="https://proxysrv:8080/"
export ftp_proxy="ftp://proxysrv:8080/"
export no_proxy=".mylan.local,.domain1.com,host1,host2"

You … Continue reading