This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Derived work from https://gist.github.com/anonymous/6516521b1fb3b464534fbc30ea3573c2 | |
More info at: https://core.telegram.org/widgets/login | |
*/ | |
class TelegramUserData{ | |
public $auth_data = false; //The data itself | |
private $outdated = 86400; //Secconds to consider some info outdated. | |
private $bottoken = "YOUTBOTTOKEN"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/php | |
<?php | |
$function = "core_webservice_get_site_info"; | |
$host = "https://aulavirtual.uv.es"; | |
$apiRest = "/webservice/rest/server.php"; | |
$token = "0123456789"; | |
$options = new stdClass(); | |
$options->moodlewsrestformat = "json"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM centos:6.8 #Informatic class OS //Centos 6.8 | |
RUN yum -y update | |
RUN yum -y install git gettext gettext-devel zlib-devel libcurl-devel tcp_wrappers-devel libxml2 libxml2-devel libxslt libxslt-devel expat-devel openssl-devel gcc make | |
RUN mkdir -p /app/git-static | |
WORKDIR /app | |
RUN git clone --recursive https://github.com/git/git.git --depth 1 | |
# --recursive because centos has an outdated git version | |
RUN cd git && \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM debian:sid-slim | |
LABEL maintainer="FabianPastor" \ | |
version="0.1" \ | |
description="Dockerfile for building Telegram TDLib" | |
RUN apt-get update \ | |
&& apt-get install -y --force-yes git build-essential gcc-5 g++-5 cmake \ | |
gperf openssl libssl-dev ccache zlib1g-dev libreadline-dev \ | |
&& update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 60 \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// TelegramWebValidator.php | |
namespace SFPL\Telegram; | |
class WebDataException extends \Exception{}; | |
class WebValidator | |
{ | |
private string $bottoken; | |
private int $time_to_expire = 86400; |
OlderNewer