Skip to content

Instantly share code, notes, and snippets.

View smaznet's full-sized avatar

Smaznet smaznet

View GitHub Profile
@smaznet
smaznet / getAdmins.php
Last active August 29, 2017 08:12
گرفتن تعداد ادمین های کانال تلگرام
<?php
function getAdminsCount($username,$token){
$html_site = file_get_contents('https://t.me/'.substr($username,1));
$htm = new DOMDocument();
$htm->loadHTML($html_site);
$finder = new DomXPath($htm);
$classname = 'tgme_page_extra';
$nodes = $finder->query("//*[contains(@class, '$classname')]");
$members = $nodes->item(0)->textContent;
@smaznet
smaznet / tofarsibot.php
Created June 5, 2017 10:18
ToFarsiBot
<?php
function doCnvert($text)
{
$text = remove_emoji($text);
$text = strtolower($text);
$result = file_get_contents("http://www.behnevis.com/php/convert.php?farsi=" . urlencode($text) . "&resulttype=json&responsetime=-1");
$res = implode(" ", array_values(json_decode(preg_replace('/[\x00-\x1F\x80-\xFF]/', '', $result), true)));
return $res;
}
@AboliOneStar
AboliOneStar / Similar.php
Last active July 6, 2020 18:24
با این سورس میتونید دو تا جمله رو با هم مقایسه کنید ببینید معنیشون یکی هست یا نه ساده هست ولی جالب
<?php
// TG: t.me/Pgming
$r = false;
if(isset($_POST['sbm'])){
$i1e = preg_split("/[\s,.-]+/", $_POST['i1']);
$i2e = preg_split("/[\s,.-]+/", $_POST['i2']);
$len = count($i1e);
$len1x = $len/2;
$match = 0;
foreach ($i1e as $f1) {