CODER_TJK Telegram 1559
๐Ÿ”ฐhttps://rakuzen.uz/day/

Bu PHP skripti bo'lib, obhavo ma'lumotlarini obhavo.uz veb-saytidan cURL yordamida oladi va DOMDocument va DOMXPath sinflari yordamida HTML tarkibini tahlil qiladi. Keyin u kun, kun uchun prognoz, ertalab, tushdan keyin va kechqurun prognozi va ishlab chiquvchining nomi kabi kerakli ma'lumotlarni chiqaradi. Olingan ma'lumotlar assotsiativ massivda saqlanadi va keyin javob uchun JSON formatida kodlanadi. Skript shuningdek, javoblar massivini xuddi shu katalogda joylashgan "day.log" nomli faylga kiritadi.
<?php
date_default_timezone_set("Asia/Tashkent");
ini_set("log_errors", 1);
ini_set("error_log", __DIR__ . "/day.log");
header('Content-Type: application/json; charset=UTF-8');
$url = "https://obhavo.uz/";

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
$dom = new DOMDocument();
libxml_use_internal_errors(true);
$dom->loadHTML($response);
libxml_use_internal_errors(false);
$xpath = new DOMXPath($dom);

$day = $xpath->query('//div[@class="current-day"]')->item(0)->nodeValue;
$tong = $xpath->query('//p[@class="forecast"]')->item(0)->nodeValue;
$kun = $xpath->query('//div[@class="col-2"]//p[@class="forecast"]')->item(0)->nodeValue;
$oqshom = $xpath->query('//div[@class="col-3"]//p[@class="forecast"]')->item(0)->nodeValue;
$namlik = $xpath->query('//div[@class="current-forecast-details"]//p')->item(0)->nodeValue;
$shamol = $xpath->query('//div[@class="current-forecast-details"]//p')->item(1)->nodeValue;
$bosim = $xpath->query('//div[@class="current-forecast-details"]//p')->item(2)->nodeValue;
$dev = "UzMaxBoy";

$response = array(
"day" => $day,
"tong" => $tong,
"kun" => $kun,
"oqshom" => $oqshom,
"namlik" => $namlik,
"shamol" => $shamol,
"bosim" => $bosim,
"dev" => $dev
);

echo json_encode($response, JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES);
error_log( print_r( $response, true ) );
?>

๐Ÿ”ฐ๐—ฅ๐—œ๐—ฉ๐—ข๐—๐—Ÿ๐—”๐—ก๐—œ๐—ฆ๐—›
๐Ÿ”ฐ๐—™๐—ข๐—ฌ๐——๐—”๐—Ÿ๐—œ ๐—•๐—Ÿ๐—ข๐—š
โšก๏ธ๐—Ÿ๐—œ๐—–๐—›: @RaKUZEN_UZ



tgoop.com/coder_tjk/1559
Create:
Last Update:

๐Ÿ”ฐhttps://rakuzen.uz/day/

Bu PHP skripti bo'lib, obhavo ma'lumotlarini obhavo.uz veb-saytidan cURL yordamida oladi va DOMDocument va DOMXPath sinflari yordamida HTML tarkibini tahlil qiladi. Keyin u kun, kun uchun prognoz, ertalab, tushdan keyin va kechqurun prognozi va ishlab chiquvchining nomi kabi kerakli ma'lumotlarni chiqaradi. Olingan ma'lumotlar assotsiativ massivda saqlanadi va keyin javob uchun JSON formatida kodlanadi. Skript shuningdek, javoblar massivini xuddi shu katalogda joylashgan "day.log" nomli faylga kiritadi.
<?php
date_default_timezone_set("Asia/Tashkent");
ini_set("log_errors", 1);
ini_set("error_log", __DIR__ . "/day.log");
header('Content-Type: application/json; charset=UTF-8');
$url = "https://obhavo.uz/";

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
$dom = new DOMDocument();
libxml_use_internal_errors(true);
$dom->loadHTML($response);
libxml_use_internal_errors(false);
$xpath = new DOMXPath($dom);

$day = $xpath->query('//div[@class="current-day"]')->item(0)->nodeValue;
$tong = $xpath->query('//p[@class="forecast"]')->item(0)->nodeValue;
$kun = $xpath->query('//div[@class="col-2"]//p[@class="forecast"]')->item(0)->nodeValue;
$oqshom = $xpath->query('//div[@class="col-3"]//p[@class="forecast"]')->item(0)->nodeValue;
$namlik = $xpath->query('//div[@class="current-forecast-details"]//p')->item(0)->nodeValue;
$shamol = $xpath->query('//div[@class="current-forecast-details"]//p')->item(1)->nodeValue;
$bosim = $xpath->query('//div[@class="current-forecast-details"]//p')->item(2)->nodeValue;
$dev = "UzMaxBoy";

$response = array(
"day" => $day,
"tong" => $tong,
"kun" => $kun,
"oqshom" => $oqshom,
"namlik" => $namlik,
"shamol" => $shamol,
"bosim" => $bosim,
"dev" => $dev
);

echo json_encode($response, JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES);
error_log( print_r( $response, true ) );
?>

๐Ÿ”ฐ๐—ฅ๐—œ๐—ฉ๐—ข๐—๐—Ÿ๐—”๐—ก๐—œ๐—ฆ๐—›
๐Ÿ”ฐ๐—™๐—ข๐—ฌ๐——๐—”๐—Ÿ๐—œ ๐—•๐—Ÿ๐—ข๐—š
โšก๏ธ๐—Ÿ๐—œ๐—–๐—›: @RaKUZEN_UZ

BY RUSHD CODERS ๐Ÿš€


Share with your friend now:
tgoop.com/coder_tjk/1559

View MORE
Open in Telegram


Telegram News

Date: |

Donโ€™t publish new content at nighttime. Since not all users disable notifications for the night, you risk inadvertently disturbing them. "Doxxing content is forbidden on Telegram and our moderators routinely remove such content from around the world," said a spokesman for the messaging app, Remi Vaughn. Telegram channels fall into two types: โ€œHey degen, are you stressed? Just let it all out,โ€ he wrote, along with a link to join the group. Just as the Bitcoin turmoil continues, crypto traders have taken to Telegram to voice their feelings. Crypto investors can reduce their anxiety about losses by joining the โ€œBear Market Screaming Therapy Groupโ€ on Telegram.
from us


Telegram RUSHD CODERS ๐Ÿš€
FROM American