Hello,
First of all, im new here and i hope im posting this in the right section.
Also im pretty new with using Linux (Ubuntu)
Forgive me if i dont understand you.
Im using
https://github.com/vysheng/tg to send Telegram messages from commandline, wich works, everything is installed correctly.
Now im trying to send messages from PHP using exec()
PHP Code:
function stuurbericht($naam,$bericht){
putenv("naam=$naam");
putenv("bericht=$bericht");
$output = exec('./stuurbericht');
echo $output;
}
stuurbericht('User_Name','Dit is een test');
When i var_dump it i get: ./telegram[0x40c64d]
When i use php /location/of/script/send.php it goes to the screen where i can send messsages, but doesnt send anything yet.
This is my bash script:
Code:
naam=$naam
bericht=$bericht
echo $naam
echo $bericht
cd /location/to/telegram/tg-master
./telegram -k tg.pub
msg $naam $bericht
Jordy