( ′∀`)σ≡σ☆))Д′)レ(゚∀゚;)ヘ=З=З=Зε≡(ノ´_ゝ`)ノ
<?php
$apiUrl = 'https://www.thebrand.ai/TheBrandZ/brandkit.php?mode=DesignByCategory&category=46';
$response = file_get_contents($apiUrl);
if ($response !== false) {
$data = json_decode($response, true);
if ($data !== null && isset($data['myphotos']) && is_array($data['myphotos'])) {
echo '<div class="container">';
foreach ($data['myphotos'] as $item) {
$image = $item['picture'];
$title = $item['title'];
// Generate the image source URL
$imageUrl = "https://www.thebrand.ai/taswira.php?width=300&height=300&quality=70&cropratio=2:1&image=/v/uploads/gallery/$image";
?>
<div class="col">
<div class="card">
<img src="<?php echo $imageUrl; ?>" alt="Business Card Image">
<div class="card-body">
<p class="card-text" ><?php echo $title; ?></p>
</div>
</div>
</div>
<?php
}
echo '</div>'; // Close the container
} else {
echo "Invalid JSON data or missing 'myphotos' key.";
}
} else {
echo "Failed to retrieve data from the API.";
}
?>