GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — TelegramMap/start.php at master · piersoft/TelegramMap

Expand file tree

/

start.php

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
executable file
·
37 lines (31 loc) · 1.07 KB
/

start.php

Copy path

File metadata and controls

executable file
·
37 lines (31 loc) · 1.07 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/usr/bin/php
<?php
//previsto da chiamare solo php start.php con 1 eventuale parametro che può essere
//hookset per settare il link di webhook
//hookremove per rimuovere il link di webhook
//getupdates per eseguzione a polling (con cron o manualmente)
//e non si imposta il primo paramentro da shell si assume di avere impostato il webhook e di utilizzare quello
include('settings_t.php');
include('getUpdates.php');
//istanzia oggetto Telegram
$bot_id = TELEGRAM_BOT;
$bot = new Telegram($bot_id);
//valuta se l'interfaccia è di tipo CLI per vedere il parametro e settare o rimuovere il webhook e poi esce (se lanciato da riga di comando)
if (php_sapi_name() == 'cli') {
if ($argv[1] == 'sethook') {
//setta il webhook
$bot->setWebhook(BOT_WEBHOOK);
} else if ($argv[1] == 'removehook') {
//rimuove il webhook
$bot->removeWebhook();
}else if ($argv[1] == 'getupdates') {
//esegue il getupdates manuale
getUpdates($bot);
}
exit;
}
//legge
$bot->init();
$update = $bot->getData();
$update_manager= new mainloop();
$update_manager->start($bot,$update);
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.