#GoogleTranslator API
to - tarjima bo'ladigan til
from - qaysi tildan tarjima bo'lishi avtomatik qilish uchun shunchaki bo'sh qoldiring
text - tarjima bo'ladigan til
Xar bir til kodlari: https://en.m.wikipedia.org/wiki/List_of_ISO_639_language_codes
function translate($text, $from, $to) {
$text = urlencode($text);
$api = "https://x.wwi.su/x/translator/";
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => $api."?text=$text&from=$from&to=$to",
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 translate($_GET["text"], $_GET["from"], $_GET["to"]);to - tarjima bo'ladigan til
from - qaysi tildan tarjima bo'lishi avtomatik qilish uchun shunchaki bo'sh qoldiring
text - tarjima bo'ladigan til
Xar bir til kodlari: https://en.m.wikipedia.org/wiki/List_of_ISO_639_language_codes
Wikipedia
List of ISO 639 language codes
Wikimedia list article
❤1🔥1
i1MusicBot.zip
9.2 KB
Please open Telegram to view this post
VIEW IN TELEGRAM
❤2
#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.
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.
🔥5💯1
import asyncio
from datetime import datetime
from telethon import TelegramClient
from telethon.tl.functions.account import UpdateProfileRequest
api_id = ""
api_hash = ""
phone = ""
session = "hour"
nick = "visualcoder"
async def update_profile():
client = TelegramClient(session=session, api_id=api_id, api_hash=api_hash)
await client.start(phone=phone)
while True:
time = datetime.now().strftime("%H:%M")
name = f"{nick}: {time}"
bio = f"Hozirgi vaqt: {time}"
await client(UpdateProfileRequest(first_name=name, about=bio))
await asyncio.sleep(60)
try:
asyncio.run(update_profile())
except:
print("o'chirildi")
📎 Pythonda telegram profilga soat o'rnatish uchun kod.
👇🏻 Kerakli kutubxonalar:
pip install asyncio telethon