Skip to content

Instantly share code, notes, and snippets.

@Mohsen322
Mohsen322 / gist:c85bc801fd3fb85c37d01086da06a1f8
Created April 7, 2020 08:37
get telegram bot users Bio without API (PHP + Web Scrapping)
// Created: https://t.me/howCreateBot
function get_web_page( $url ){
$options = array(
CURLOPT_RETURNTRANSFER => true, // return web page
CURLOPT_HEADER => false, // don't return headers
CURLOPT_FOLLOWLOCATION => true, // follow redirects
CURLOPT_ENCODING => "", // handle all encodings
CURLOPT_USERAGENT => "spider", // who am i
CURLOPT_AUTOREFERER => true, // set referer on redirect
class KavenegarSms
{
private $fix_url = 'https://api.kavenegar.com/v1/';
private $api_key = 'YOUR-API-KEY';
function lunchCURL($url, $fields){
$ch = curl_init();
curl_setopt( $ch,CURLOPT_URL, $url );
curl_setopt( $ch,CURLOPT_POST, true );
class OneSignal
{
private $rest_key = 'YOUR_REST_KEY';
private $app_id = 'YOUR_APP_ID';
function lunchCURL($fields){
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://onesignal.com/api/v1/notifications");
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json',
'Authorization: Basic '.$this->rest_key));