From 010a56bff630ccf04c1524a06a34e6a49ab03ea3 Mon Sep 17 00:00:00 2001 From: nudista Date: Fri, 23 Feb 2024 15:18:46 +0100 Subject: [PATCH] Odstranit google-bard-programuje.html --- google-bard-programuje.html | 73 ------------------------------------- 1 file changed, 73 deletions(-) delete mode 100644 google-bard-programuje.html diff --git a/google-bard-programuje.html b/google-bard-programuje.html deleted file mode 100644 index f1049a4..0000000 --- a/google-bard-programuje.html +++ /dev/null @@ -1,73 +0,0 @@ -Google Bard programuje - Nástěnka 🅝 Nudista

Google Bard programuje

Zadal jsem umělé inteligenci úkol, naprogramovat script v PHP pro parsování JSON

<?php

// Importuj knihovnu pro práci s JSON
//require 'json.php';

// Vytvoř URL adresu pro požadavek
$url = 'https://witter.cz/api/v1/accounts/110687031564474645/statuses';

// Proveď požadavek
$response = file_get_contents($url);

// Dekóduj JSON data
$data = json_decode($response, true);

// Vytvoř HTML5 kontejner
echo '<div class="statuses">';

// Projděte všechna data
foreach ($data as $status) {

    // Vytvoř HTML5 tweet
    echo '<div class="tweet">';

    // Vytiskněte text tweetu (default text)
    echo '<p class="text">' . $status['content'] . '</p>';

    // Vytiskněte datum a čas tweetu
    echo '<p class="time">' . $status['created_at'] . '</p>';

    // Vytiskněte počet lajků
    if($status['sensitive'] == "1"){
    $mature = 'NSFW';
    } else {
    $mature = 'OK';
    }
    echo '<p class="likes">' . $mature . ' lajků</p>';

    // Vytiskněte počet retweetů
    echo '<p class="retweets">' . $status['retweets'] . ' retweetů</p>';

    // Zavřete HTML5 tweet
    echo '</div>';
}

// Zavřete HTML5 kontejner
echo '</div>';
?>

Tento příspěvek byl aktualizován dne:
\ No newline at end of file