Portfolio: Nature Photography & PHP/MySQL
Selected nature and bird photography examples paired with structured folder/file naming and PHP/MySQL tooling.
Nature & Bird Photography Examples
Each item reads the species name and [Latin name] from the folder name, and extracts location and date from the .webp filename (for example: Barcelona Spain (15nov2026).webp). Thumbnails load from /test-website/album/.
Kluut [Recurvirostra avosetta]
Vos [Vulpes vulpes]
PHP & MySQL: vogelsnamen.php & IOC World Bird List
A lightweight PHP 8.x and MySQL setup storing the IOC World Bird List with multilingual bird names, search autocomplete, and language completeness tracking without heavy frameworks.
- Structured species table: pairs common names with scientific binomials so searches and taxon views stay consistent.
- Fast lookup & autocomplete: queries indexed name columns cleanly using prepared statements.
- Language coverage overview: tracks how many species have translations per language.
<?php
declare(strict_types=1);
/**
* Voorbeeldquery voor vogelsnamen.php op basis van de IOC-lijst in MySQL.
*/
function zoekVogelsOpNaam(PDO $pdo, string $zoekterm, string $taalKolom = 'nl'): array
{
$toegestaneTalen = ['nl', 'en', 'la'];
if (!in_array($taalKolom, $toegestaneTalen, true)) {
$taalKolom = 'nl';
}
$sql = "SELECT id, scientific_name, {$taalKolom} AS common_name
FROM vogels
WHERE {$taalKolom} LIKE :zoek
OR scientific_name LIKE :zoek
ORDER BY {$taalKolom} ASC
LIMIT 25";
$stmt = $pdo->prepare($sql);
$stmt->execute([':zoek' => '%' . $zoekterm . '%']);
return $stmt->fetchAll(PDO::FETCH_ASSOC);
}
?>
How Folder & Filename Metadata Are Parsed in PHP 8.x
This helper splits a folder like "Aalscholver [Phalacrocorax carbo]" into name and [Latin name], and splits "Barcelona Spain (15nov2026).webp" into location and date.
<?php
declare(strict_types=1);
// Voorbeeld:
// Mapnaam: "Aalscholver [Phalacrocorax carbo]"
// Bestandsnaam: "Barcelona Spain (15nov2026).webp"
$map = 'Aalscholver [Phalacrocorax carbo]';
$bestand = 'Barcelona Spain (15nov2026).webp';
preg_match('/^(.*?)\s*\[([^\]]+)\]\s*$/u', $map, $mapMatch);
$soortNaam = trim($mapMatch[1] ?? $map);
$latijn = isset($mapMatch[2]) ? '[' . trim($mapMatch[2]) . ']' : '';
$stam = pathinfo($bestand, PATHINFO_FILENAME);
preg_match('/^(.*?)\s*\(([^)]+)\)\s*$/u', $stam, $fileMatch);
$plaats = trim($fileMatch[1] ?? $stam);
$datum = trim($fileMatch[2] ?? '');
// Resultaat:
// $soortNaam = "Aalscholver"
// $latijn = "[Phalacrocorax carbo]"
// $plaats = "Barcelona Spain"
// $datum = "15nov2026"
?>