Кабинет

Посты канала 𝗛𝗠𝗦.𝗧𝗘𝗔𝗠 𓃠

сначала новые

#1660Текст
Просмотры47−39%к среднему
Пересылки—
Реакции7
Комментарии—
#1659Фото
Просмотры44−43%к среднему
Пересылки—
Реакции6
Комментарии—
#1657Превью ссылки

API Detecting counterfeit banknotes <?php header('Content-Type: application/json; charset=utf-8'); $api_key = 'zV97muGst0FECM3fxSA0'; $model_endpoint = 'banknote-counterfeit-detection/12'; if (!isset($_GET['url']) || empty($_GET['url'])) {     http_response_code(400);     echo json_encode(["error" => "مرر رابط الصورة عبر ?url=xxx.jpg"], JSON_UNESCAPED_UNICODE);     exit; } $image_url = filter_var($_GET['url'], FILTER_VALIDATE_URL); if ($image_url === false) {     http_response_code(400);     echo json_encode(["error" => "الرابط غير صالح"], JSON_UNESCAPED_UNICODE);     exit; } $url = "https://detect.roboflow.com/" . $model_endpoint      . "?api_key=" . urlencode($api_key)      . "&image=" . urlencode($image_url); $options = ['http' => ['method' => 'GET', 'timeout' => 30, 'ignore_errors' => true]]; $context = stream_context_create($options); $result  = @file_get_contents($url, false, $context); if ($result === false) {     http_response_code(502);     echo json_encode(["error" => "فشل الاتصال بـ Roboflow"], JSON_UNESCAPED_UNICODE);     exit; } echo $result; • كشف العملات المزورة عبر الرؤيه الحاسوبيه شغال على عملة الفلبين من الآخ الجزائري فيسكو (صدقة  جارية) اعطيتكم مبدأ الفكرة والباقي عليكم، فيك تدرب نموذج من الموقع على حسب عملة بلدك وتخليه يميز ويكشف العملة المزوره

Открыть в Telegram
Просмотры95+24%к среднему
Пересылки—
Реакции1
Комментарии—
#1654Фото
Просмотры99+29%к среднему
Пересылки—
Реакции—
Комментарии—
#1651Видео
Просмотры87+13%к среднему
Пересылки—
Реакции—
Комментарии—
#1650Фото
Просмотры62−19%к среднему
Пересылки—
Реакции—
Комментарии—
#1649Фото
Просмотры74−4%к среднему
Пересылки—
Реакции1
Комментарии—
#1648Текст

<?php declare(strict_types=1); define('visco_dz', 'https://www.cardscanner.co/api/new-image-to-text'); define('visco_ai', '27C4EADF5FB3F1DD7211A39B6EEB6B4D'); define('viscov', 'AIzaSyBVcjopDK1sfu3ZVwU-1IRJMRSzX-8Ivlo'); header('Content-Type: application/json; charset=utf-8'); header('X-Content-Type-Options: nosniff'); function respond(array $data, int $code = 200): void {     http_response_code($code);     echo json_encode($data, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES);     exit; } function downloadImage(string $url): ?string {     $ch = curl_init($url);     curl_setopt_array($ch, [         CURLOPT_RETURNTRANSFER => true,         CURLOPT_FOLLOWLOCATION => true,         CURLOPT_MAXREDIRS      => 5,         CURLOPT_TIMEOUT        => 60,         CURLOPT_CONNECTTIMEOUT => 15,         CURLOPT_SSL_VERIFYPEER => false,         CURLOPT_SSL_VERIFYHOST => 0,         CURLOPT_USERAGENT      => 'Mozilla/5.0',     ]);     $body  = curl_exec($ch);     $errno = curl_errno($ch);     $code  = (int)curl_getinfo($ch, CURLINFO_RESPONSE_CODE);     curl_close($ch);     if ($body === false || $errno !== 0 || $code !== 200 || strlen($body) < 100) return null;     return (string)$body; } function ocrImage(string $bytes): ?string {     $tmp = tempnam(sys_get_temp_dir(), 'ocr_');     if ($tmp === false) return null;     if (file_put_contents($tmp, $bytes) === false) { @unlink($tmp); return null; }     $post = [         'api'        => visco_ai,         'google_api' => viscov,         'image'      => new CURLFile($tmp, 'image/jpeg', 'img.jpg'),     ];     $ch = curl_init(visco_dz);     curl_setopt_array($ch, [         CURLOPT_POST           => true,         CURLOPT_POSTFIELDS     => $post,         CURLOPT_RETURNTRANSFER => true,         CURLOPT_TIMEOUT        => 90,         CURLOPT_CONNECTTIMEOUT => 15,         CURLOPT_SSL_VERIFYPEER => false,         CURLOPT_USERAGENT      => 'okhttp/5.0.0-alpha.4',     ]);     $raw  = curl_exec($ch);     $code = (int)curl_getinfo($ch, CURLINFO_RESPONSE_CODE);     curl_close($ch);     @unlink($tmp);     if ($raw === false || $code !== 200) return null;     $j = json_decode((string)$raw, true);     if (is_array($j)) {         foreach (['text', 'result', 'output', 'ocr'] as $k) {             if (!empty($j[$k]) && is_string($j[$k])) return trim($j[$k]);         }         if (isset($j['data']) && is_string($j['data'])) return trim($j['data']);     }     $flat = trim((string)$raw);     return $flat !== '' ? $flat : null; } $url = trim((string)($_GET['visco'] ?? $_POST['visco'] ?? '')); if ($url === '') respond(['success' => false, 'error' => 'url مطلوب'], 400); if (!filter_var($url, FILTER_VALIDATE_URL)) respond(['success' => false, 'error' => 'url غير صالح'], 400); $bytes = downloadImage($url); if ($bytes === null) respond(['success' => false, 'error' => 'فشل تحميل الصورة'], 502); $text = ocrImage($bytes); if ($text === null) respond(['success' => false, 'error' => 'فشل استخراج النص'], 502); respond(['success' => true, 'text' => $text]); - OCR API - For testing : api.php?visco=example.jpg By  :- @NB_DZ 👤 support: @ppbbffl 📣 channel: @OP_J77 📣 Prompt: @RJ_DZ 📣 Uz Channel: @viscoai

Открыть в Telegram
Просмотры81+5%к среднему
Пересылки—
Реакции—
Комментарии—
#1646Текст
Просмотры82+7%к среднему
Пересылки—
Реакции2
Комментарии—
#1644Фото
Просмотры96+25%к среднему
Пересылки—
Реакции—
Комментарии—