Skip to content

Instantly share code, notes, and snippets.

View digitalhitler's full-sized avatar

Sergey S Petrenko digitalhitler

View GitHub Profile
@digitalhitler
digitalhitler / SETUP_GUIDE.md
Last active December 8, 2015 14:39 — forked from hwdsl2/.MOVED.md
IPsec L2TP VPN Auto Install Script for Ubuntu 14.04 & 12.04 and Debian 8
<?php
// Run from the command line, so we'll grab arguments from there
// input arguments: 0=>script, 1=>file_name, 2=>temp_file
$file_name = $argv[1];
$temp_file = $argv[2];
$uploads = '/opt/lampp/htdocs/user_uploads/';
// Set up file location strings
<?php
define('BOT_TOKEN', 'XXXXXXXX:XXXXXXXXXXXXXXXXXXXXXXXX'); // place bot token of your bot here
function checkTelegramAuthorization($auth_data) {
$check_hash = $auth_data['hash'];
unset($auth_data['hash']);
$data_check_arr = [];
foreach ($auth_data as $key => $value) {
$data_check_arr[] = $key . '=' . $value;