merhaba arkadaşlar,
düzenlediğim bir rss taslağında sitede yayınlanmamış olan yazıları döngüye dahil etmek istemiyorum. Ancak yazılar tamamlanıp yayınlandıkları zaman rss e dahil edilsin istiyorum nasıl yapabilirim ?
edit 1 :
foreach ($result as $row) {
$publish_Date = date("D, d M Y H:i:s T", strtotime($row["datetime"]));
$image_size_array = get_headers($base_url . "cdn/recipes//" . $row["featured_image"], 1);
$image_size = $image_size_array["Content-Length"];
$image_mime_array = getimagesize($base_url . "cdn/recipes/" . $row["featured_image"]);
$image_mime = $image_mime_array["mime"];
echo "<item xmlns:dc='ns:1'>" . PHP_EOL;
echo "<title>" . $row["title"] . "</title>" . PHP_EOL;
echo "<link>" . $base_url . "recipe/" . $row["permalink"] . "/</link>" . PHP_EOL;
echo "<guid>" . md5($row["recipe_id"]) . "</guid>" . PHP_EOL;
echo "<pubDate>" . $row["created"] . "</pubDate>" . PHP_EOL;
echo "<dc:creator>BiDokunus</dc:creator>" . PHP_EOL;
echo "<description>" . substr($row["description"], 0, 300) . "</description>" . PHP_EOL;
echo "<enclosure url='cdn/recipes/" . $row["featured_image"] . "' length='" . $image_size . "' type='" . $image_mime . "' />" . PHP_EOL;
echo "<category>yemek</category>" . PHP_EOL;
echo "</item>" . PHP_EOL;
}
kodlarım bu şekilde bu döngüye "status değeri inactive ise döngü dışında kalsın " komutu eklemek istiyorum.