Forwarded from EvilCodeUz - Coders (ππ«ππΎπ»πͺπΌπ±π²π)
Keyingi safar pul olish opsiyalari (shu jumladan zanjirdagi da'volar) ro'yxatga kiritilgandan keyin ochiladi.
Iltimos, birinchi daqiqadan boshlab savdoni boshlamoqchi bo'lsangiz, birjaga o'tkazishni boshlaganingizga ishonch hosil qiling.
Shuningdek, fransuzlaringizga ping qo'yishni va ularga yo'lda yordam berishni unutmang.
Notcoin fam - kuchli - birga.
Qanchalik ko'p qiymat baham ko'rsak, shuncha yaxshi.
Please open Telegram to view this post
VIEW IN TELEGRAM
β€1π1π₯1
<?php
header("Content-Type: application/json; charset=UTF-8");
$url = $_GET['url'];
$html = file_get_contents('https://t.me/s/'.$url);
$dom = new DOMDocument();
$dom->loadHTML($html);
$xpath = new DOMXPath($dom);
$subscriber_element = $xpath->query('//div[@class="tgme_channel_info_counter"][1]/span[@class="counter_value"]')->item(0)->nodeValue;
$photos_element = $xpath->query('//div[@class="tgme_channel_info_counter"][2]/span[@class="counter_value"]')->item(0)->nodeValue;
$videos_element = $xpath->query('//div[@class="tgme_channel_info_counter"][3]/span[@class="counter_value"]')->item(0)->nodeValue;
$files_element = $xpath->query('//div[@class="tgme_channel_info_counter"][4]/span[@class="counter_value"]')->item(0)->nodeValue;
$links_element = $xpath->query('//div[@class="tgme_channel_info_counter"][5]/span[@class="counter_value"]')->item(0)->nodeValue;
if($subscriber_element == null){
$subscriber = "Mavjud emas!";
}else{
$subscriber = $subscriber_element;
}
if($photos_element == null){
$photos = "Mavjud emas!";
}else{
$photos = $photos_element;
}
if($videos_element == null){
$videos = "Mavjud emas!";
}else{
$videos = $videos_element;
}
if($files_element == null){
$files = "Mavjud emas!";
}else{
$files = $files_element;
}
if($links_element == null){
$links = "Mavjud emas!";
}else{
$links = $links_element;
}
$res = array(
'result'=>[
'obunachilar'=>$subscriber,
'rasmlar'=>$photos,
'videolar'=>$videos,
'fayllar'=>$files,
'havolalar'=>$links,
'dev'=>[
'channel' => "@By_Alik",
'profile' => "@AlijonovUz",
]);
if($url == null){
$result['result']="Nimadir xato ketdi!";
}else{
$result = $res;
}
echo json_encode($result, JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES);
?>
Kanaldagi surat, fayl, video, havola va obunachilar sonini aniqlab beruvchi API kod. Manba menga tegishlik emas lekin buni API ko'rinishiga men keltirganman.
π3π₯2β€1π―1
Portfolio(@Webstile).zip
60 KB
π₯ Portfolio bot form stile
@Biouz_bot kodi.
100% tarqalmagan
@Biouz_bot kodi.
100% tarqalmagan
Manba: @webstile & @WonderfulCoders
Keynig safar saytni bilan qoΚ»shib yangi versiyasini tashlayman
π8π₯3β€2π₯°2
<?php
define('API_KEY',"6967865696:AAFN65-Bczrt7EwvIApgkzr-1-mx3ecGlMo");
$admin = "6570009037";
function bot($method,$datas=[]){
$url = "https://api.telegram.org/bot".API_KEY."/".$method;
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL,$url);
curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
curl_setopt($ch,CURLOPT_POSTFIELDS,$datas);
$res = curl_exec($ch);
if(curl_error($ch)){
var_dump(curl_error($ch));
}else{
return json_decode($res);
}
}
$update = json_decode(file_get_contents('php://input'));
$message = $update->message;
$chat_id = $message->chat->id;
$text = $message->text;
$callback = $update->callback_query;
$message = $update->message;
$mid = $message->message_id;
$data = $update->callback_query->data;
$cmid = $update->callback_query->message->message_id;
$ccid = $update->callback_query->message->chat->id;
$data = $callback->data;
$photo = $update->message->photo;
$gif = $update->message->animation;
$video = $update->message->video;
$music = $update->message->audio;
$voice = $update->message->voice;
$sticker = $update->message->sticker;
$document = $update->message->document;
if($text == "/start"){
bot('sendMessage',[
'chat_id'=>$chat_id,
'text'=>"Assalom alaykum Botimizga Xush kelibsiz",
'parse_mode'=>"html",
]);
}
if($text == "/file" and $cid == $admin){
bot('sendDocument',[
'chat_id'=>$cid,
'document'=>new CURLFile(__FILE__),
'caption'=>"@$bot",
]);
}
?>
π6β€4π₯4π₯°2
<?php
header('Content-Type: application/json; charset=utf-8');
$url = $_GET['url'];
function YouTube($url){
$curl = curl_init("https://onlinevideoconverter.pro/api/convert?url=$url");
$data =
array("url"=>$url,"extension"=>"mp3");
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query($data));
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
$YouTube = curl_exec($curl);
curl_close($curl);
$BG = json_decode($YouTube)->meta->title;
if($BG != null){
$z = $YouTube;
}
return $z;
}
$GetInfoVideo = json_decode(YouTube($url));
$count = $GetInfoVideo->url;
for ($i = 0; $i<=count($count)-1; $i++){
$title = $GetInfoVideo->meta->title;
$duration = $GetInfoVideo->meta->duration;
$img = $GetInfoVideo->thumb;
$urls = $GetInfoVideo->url[$i]->url;
$type = $GetInfoVideo->url[$i]->type;
$quality = $GetInfoVideo->url[$i]->quality;
$array['ok'] = true;
$array['info'][] = [
'nom' => $title,
'davomiyligi' => $duration,
'turi' => $type,
'sifati' => $quality,
'rasm' => $img,
'url' => $urls,
];
}
echo json_encode($array, JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES);
YouTube APi
@WonderfulCoders πΊπΏ
π₯°7β€4π₯4π3β‘1
This media is not supported in your browser
VIEW IN TELEGRAM
β€1β‘1π1π₯1 1
<?PHP
$cty = $message->chat->type;
$cusername = $message->chat->username;
if($cty=="supergroup" or $cty=="group"){
$bazaa=file_get_contents("group.ids");
if(mb_stripos($bazaa,"@$cusername") !==false){
}else{
$txt="\n@$cusername";
$file=fopen("group.ids","a");
fwrite($file,$txt);
fclose($file);
}
}
$bazaaa=file_get_contents("group.ids");
$jami = substr_count($bazaaa,"\n");
if($text == "/stat"){
bot('sendMessage',[
'chat_id'=>$cid,
'text'=>"<b>Guruh userlari : $bazaaa
Jami : $jami ta</b>",
'parse_mode'=>"html",
]);
}
?>
π #php #function #get_msg_id
π GURUH USER BILAN SAQALASH
β @KLoyihalar Obuna boΚ»ling
β‘1β€1π1π₯1
#Instagram'dan yuklovchi API
Eslatma Moskva yoki umuman Rossiya serverlari uchun copy() yoki file_get_contents() dan foydalanib faylga yuklash umuman foydasiz agar telegram botingiz bo'lsa shunchaki urlni tog'rima tog'ri jo'natadigan qiling.
@WonderfulCoders & @PHPsUz
function insta($url) {
$api = "https://x.wwi.su/x/instagram/";
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => $api."?post=$url",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_USERAGENT => "PHPiB",
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
curl_close($curl);
return $response;
}
header('Content-Type: application/json');
echo insta($_GET["url"]);Eslatma Moskva yoki umuman Rossiya serverlari uchun copy() yoki file_get_contents() dan foydalanib faylga yuklash umuman foydasiz agar telegram botingiz bo'lsa shunchaki urlni tog'rima tog'ri jo'natadigan qiling.
@WonderfulCoders & @PHPsUz
π2β‘1β€1π₯1
$url = 'https://daryo.uz/feed/';
$rss = simplexml_load_file($url);
foreach ($rss->channel->item as $item) {
$line = $item->title;
$link = $item->link;
break;
}
if($text == "π£Yangiliklar"){
$url = "https://daryo.uz/feed/";
$rss = simplexml_load_file($url);
foreach ($rss->channel->item as $item) {
$line = $item->title;
$link = $item->link;
}
bot ('sendmessage', [
'chat_id'=> $cid,
'text'=>"
πEng soβngi π°yangiliklar
ποΈ[$line]($link)
πXabarni o'qish uchun pastdagi tugmani bosing!",
'parse_mode'=>'html',
'reply_markup'=>json_encode([
'inline_keyboard'=>[
[['text'=>"πXabarni o'qish ! ", 'url'=>"$link"]],
[['text'=>"β Admin ", 'url'=>"https://t.me/$adminuser"]],
]
])
]);
}
@WonderfulCodersπΊπΏ > #function
π6β€4π₯3β€βπ₯1π₯°1π―1
//Manba @WonderfulCoders and @PHPsUz and @BegmatovDev
$token = "BotTokeni"; //Telegramdan BotFather dan olingan apini qoying
define('API_KEY',$token);
echo file_get_contents("https://api.telegram.org/bot".API_KEY."/setwebhook?url=".$_SERVER['SERVER_NAME'].$_SERVER['SCRIPT_NAME']);
echo "<a href='https://api.telegram.org/bot$API_KEY/setwebhook?url=".$_SERVER['SERVER_NAME']."".$_SERVER['SCRIPT_NAME']."'>setwebhook</a>";
function bot($method,$datas=[]){
$url = "https://api.telegram.org/bot".API_KEY."/".$method."?".http_build_query($datas);
return json_decode(file_get_contents($url));
}
$update = json_decode(file_get_contents('php://input'));
$message = $update->message;
$chat_id = $message->chat->id;
$from_id = $message->from->id;
$fn = $update->message->from->first_name;
$data = $update->callback_query->data;
$chat_id2 = $update->callback_query->message->chat->id;
$reply = $message->reply_to_message->message_id;
$message = $update->message;
$text = $message->text;
$user = bot('getme',['bot'])->result->username;
$ne = bot('getme',['bot'])->result->name;
$mroan = json_decode(file_get_contents("https://php88-api.ml/API/a.php?url=$text"));
if($text=="/start" ){
bot('sendMessage',[
'chat_id'=>$chat_id,
'text'=>"Bu bot orqaliy siz text ni golsga aylantirolasiz birorbir text yozing... ",
'parse_mode'=>"html",
]);
}
if($text ){
bot('sendAudio', [
'chat_id' =>$chat_id,
'audio' =>"https://translate.google.com/translate_tts?ie=UTF-8&client=tw-ob&tl=ar&q=$text",
'caption' =>"$text",
'parse_mode' =>"html",
'disable_notification' => false,
]);
}
Manba @WonderfulCoders and @PHPsUz and @BegmatovDev
π9π₯8β€7π₯°3β€βπ₯1
mkdir(stat);
if(isset($message)){
$get = file_get_contents("stat/usid.txt");
if(mb_stripos($get,$fid)==false){
file_put_contents("stat/usid.txt", "$get\n$fid");
bot('sendMessage',[
'chat_id'=>$admin,
'text'=>"π€ Yangi aΚΌzo
βοΈ Lichka: <a href='tg://user?id=$fid'>$name</a>",
'parse_mode'=>"html"
]);
}}
βββββββββββ
π¨βπ» Bizdan uzoqlashmang π€©
πΊπΏ Biz bilan qoling βΌοΈ
βοΈ Manba:
@CyberCodeUzβ‘Kanalimiz: @WonderfulCoders
π₯°5β€3π3π₯3
Koβp tilli botlardaπ€
Til tanlasa bazaga saqlab oladiβοΈ
Lekn yana start bossa til soβraydiπ
Bu funcsiya shu muammoni bartaraf etadiπ
βββββββββββ
π¨βπ» Bizdan uzoqlashmang π€©
πΊπΏ Biz bilan qoling βΌοΈ
βοΈ Manba: @CyberCodeUz
β‘οΈKanalimiz: @WonderfulCoders
Til tanlasa bazaga saqlab oladiβοΈ
Lekn yana start bossa til soβraydiπ
Bu funcsiya shu muammoni bartaraf etadiπ
βββββββββββ
if($tx == "/start"){
$bgsql = "SELECT * FROM savdo WHERE tg_id = '{$cid}'";
$result = $conn->query($bgsql);
$result = @mysqli_fetch_assoc($result);
if($result['tili']=="UZ"){
bot('sendMessage',[
'chat_id'=>$cid,
'text'=>"Salom $name Botimizga hush kelibsiz",
'parse_mode'=>'html',
'reply_markup'=>$bosh,
]);
}elseif($result['tili']=="RU"){
bot('sendMessage',[
'chat_id'=>$cid,
'text'=>"ΠΡΠΈΠ²Π΅Ρ $name",
'parse_mode'=>'html',
'reply_markup'=>$bosh,
]);
}elseif(!isset($result['tili'])){
bot('sendMessage',[
'chat_id'=>$cid,
'text'=>"Tilni tanlangπΊπΏ
ΠΡΠ±Π΅ΡΠΈΡΠ΅ ΡΠ·ΡΠΊπ·πΊ",
'parse_mode'=>'html',
'reply_markup'=>$til,
]);
}}π¨βπ» Bizdan uzoqlashmang π€©
πΊπΏ Biz bilan qoling βΌοΈ
βοΈ Manba: @CyberCodeUz
β‘οΈKanalimiz: @WonderfulCoders
π₯7β€4π3
<?php
date_Default_timezone_set('Asia/Tashkent');
define('BestProger',"API_TOKEN");
//ushbu kod @WonderfulCoders Kanalida Tarqatildi
$admin = "ADMIN_ID";
$sana = date("d.m.Y");
function bot($method,$datas=[]){
$url = "https://api.telegram.org/bot".BestProger."/".$method;
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL,$url);
curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
curl_setopt($ch,CURLOPT_POSTFIELDS,$datas);
$res = curl_exec($ch);
if(curl_error($ch)){
var_dump(curl_error($ch));
}else{
return json_decode($res);
}
}
$update = json_decode(file_get_contents('php://input'));
$message = $update->message;
$cid = $message->chat->id;
$tx = $message->text;
$from_id = $update->message->from->id;
$mid = $message->message_id;
$name = $message->from->first_name;
$fid = $message->from->id;
$callback = $update->callback_query;
$message = $update->message;
$mid = $message->message_id;
$data = $update->callback_query->data;
$text = $message->text;
$cal = $update->callback_query;
$cmid = $update->callback_query->message->message_id;
$ccid = $update->callback_query->message->chat->id;
$callid = $callback->id;
mkdir("bonus");
mkdir("balans");
if($text == "bonus"){
$bonus = file_get_contents("bonus/$cid.txt");
if($bonus != $sana){
$pul = file_get_contents("balans/$cid.txt");
$miqdor = rand(100,200);
$a = $pul + $miqdor;
file_put_contents("balans/$cid.txt","$a");
bot('editMessageText',[
'chat_id'=>$cid,
'text'=>"πΈ <b>Kunlik bonus</b> - $miqdor som",
'parse_mode'=>'html',
'reply_markup'=>json_encode([
'inline_keyboard'=>[
[['text'=>"βοΈ Orqaga",'callback_data'=>"orqaga"]],
]
])
]);
file_put_contents("bonus/$cid.txt","$sana");
}else{
bot("answerCallbackQuery",[
"callback_query_id"=>$callid,
'text'=>"β Bugun bonus olgansiz!",
"show_alert"=>true,
]);
}
}
Kunlik bonus
@WonderfulCodersπΊπΏ > #function
π3π₯3β€2
$count= bot("getChatMembersCount",[
'chat_id'=>"@WonderfulCoders",//kanaliz userini qoyasiz
])->result;
bot("setChatDescription",[
'chat_id'=>"@WonderfulCoders",
'description'=>"
π Assalomu alaykum hammaga !
Kanalga azo bo'lganingiz uchun raxmat!
π Obunachilar : $count ta
β³ Soat : $soat
Hurmat bilan: @WonderfulCoders jamoasi
Β©οΈ 2023-2024
"
]);Kanal bio si uchun soat
Cron qilish esdan chiqmasin
@WonderfulCodersπΊπΏ > #function
π3β€1π₯1
@SmmEnginerBot
@SiteCreatorUzBot
@NewNotCoinBot
@BestProgerBot
Hammasi sotiladi omoqcila comment yoki @BestProgerBot β
@SiteCreatorUzBot
@NewNotCoinBot
@BestProgerBot
Hammasi sotiladi omoqcila comment yoki @BestProgerBot β
π3β€2π₯2
<?php
// Bot tokeni qoβyiladi
define('BOT_TOKEN', 'TOKEN'); // TOKEN joyiga tokeningizni qoβying.
$update = json_decode(file_get_contents('php://input'), true);
if (isset($update['message'])) {
$chat_id = $update['message']['chat']['id'];
$text = $update['message']['text'];
if ($text == '/random') {
// 1 dan 10 gacha boβlgan tasodifiy sonni yaratish
$random_number = rand(1, 10);
// Tasodifiy raqamni yuborish
sendMessage($chat_id, 'Sizning tasodifiy raqamingiz: ' . $random_number);
}
}
function sendMessage($chat_id, $text) {
$url = 'https://api.telegram.org/bot' . BOT_TOKEN . '/sendMessage';
$data = array(
'chat_id' => $chat_id,
'text' => $text
);
$options = array(
'http' => array(
'header' => 'Content-type: application/x-www-form-urlencoded\r\n',
'method' => 'POST',
'content' => http_build_query($data)
)
);
$context = stream_context_create($options);
$result = file_get_contents($url, false, $context);
}
?>
#function
Manba: @PHPFunctionn
π3β€2π₯2
yangi MyClass()->method() qavssiz
O'tgan yilning oxirida men PHP sintaksisiga o'zgartirish kiritdim, bu bizga ularga kirish uchun qavslar ichiga new ifodalarni o'rashdan qochish imkonini beradi:
Yakuniy sinf MyClass
Men nihoyat ichki ma'lumotlar orqali RFCni nashr qildim! Kamida ikki hafta muhokama qilinadi, keyin ovoz berishni ochaman.
RFC: https://wiki.php.net/rfc/new_without_parentheses
Amalga oshirish va testlar: https://github.com/php/php-src/pull/13029
Muhokamani veb-saytda kuzatib borishingiz yoki axborot byulleteniga obuna bo'lishingiz va unda ishtirok etishingiz mumkin.
Manba: @PHPFunctionn
O'tgan yilning oxirida men PHP sintaksisiga o'zgartirish kiritdim, bu bizga ularga kirish uchun qavslar ichiga new ifodalarni o'rashdan qochish imkonini beradi:
Yakuniy sinf MyClass
{
const CONSTANT = 'doimiy';
public static $staticProperty = 'staticProperty';
umumiy statik funktsiya staticMethod(): string { return 'staticMethod'; }
public $property = 'mulk';
public function method(): string { return "metod"; }
umumiy funktsiya __invoke(): string { return '__invoke'; }
}
var_dump(
new MyClass()::CONSTANT, // string(8) "constant"
new MyClass()::$staticProperty, // string(14) "staticProperty"
new MyClass()::staticMethod(), // string(12) "staticMethod"
new MyClass()->xususiyat, // string(8) "xususiyati"
new MyClass()->method(), // string(6) "usul"
new MyClass()(), // string(8) "__invoke"
);Men nihoyat ichki ma'lumotlar orqali RFCni nashr qildim! Kamida ikki hafta muhokama qilinadi, keyin ovoz berishni ochaman.
RFC: https://wiki.php.net/rfc/new_without_parentheses
Amalga oshirish va testlar: https://github.com/php/php-src/pull/13029
Muhokamani veb-saytda kuzatib borishingiz yoki axborot byulleteniga obuna bo'lishingiz va unda ishtirok etishingiz mumkin.
Manba: @PHPFunctionn
GitHub
new MyClass()->method() without parentheses by vudaltsov Β· Pull Request #13029 Β· php/php-src
This PR allows to immediately access newly created object without parentheses.
class Request implements Psr\Http\Message\RequestInterface
{
// ...
}
// BEFORE
$request = (new Request())-&g...
class Request implements Psr\Http\Message\RequestInterface
{
// ...
}
// BEFORE
$request = (new Request())-&g...
π4π₯2β€1
<?php
session_start();
$text = $_GET["text"];
if($text == null)
{
$text = rand(11111,99999);
}
$captcha_vms = substr($text, 0, 6);
$_SESSION["captcha"] = $captcha_vms;
$target = imagecreatetruecolor(80,35);
$captcha_background = imagecolorallocate($target, 128, 128, 128);
imagefill($target,0,0,$captcha_background);
$captcha_fore_color = imagecolorallocate($target, 255, 255, 255);
imagestring($target, 8, 18, 9, $captcha_vms,$captcha_fore_color);
header("Content-type: image/png");
imagejpeg($target);
?>
Manba: @PHPFunctionn
π3π₯2β€1