diff --git a/api/pexels.php b/api/pexels.php deleted file mode 100644 index a4a7ba2..0000000 --- a/api/pexels.php +++ /dev/null @@ -1,28 +0,0 @@ - 'assets/images/pexels/'.$p['id'].'.jpg', - 'photographer' => $p['photographer'] ?? 'Unknown', - 'photographer_url' => $p['photographer_url'] ?? '', - ]; - } else { - // Fallback: Picsum - $out[] = [ - 'src' => 'https://picsum.photos/600', - 'photographer' => 'Random Picsum', - 'photographer_url' => 'https://picsum.photos/' - ]; - } -} -echo json_encode($out); diff --git a/assets/images/pexels/102104.jpg b/assets/images/pexels/102104.jpg deleted file mode 100644 index 7e776ad..0000000 Binary files a/assets/images/pexels/102104.jpg and /dev/null differ diff --git a/assets/images/pexels/698275.jpg b/assets/images/pexels/698275.jpg deleted file mode 100644 index 07abbe7..0000000 Binary files a/assets/images/pexels/698275.jpg and /dev/null differ diff --git a/assets/images/pexels/842687.jpg b/assets/images/pexels/842687.jpg deleted file mode 100644 index e160b6b..0000000 Binary files a/assets/images/pexels/842687.jpg and /dev/null differ diff --git a/includes/pexels.php b/includes/pexels.php deleted file mode 100644 index 0c04a85..0000000 --- a/includes/pexels.php +++ /dev/null @@ -1,25 +0,0 @@ - 0 ? $k : 'Vc99rnmOhHhJAbgGQoKLZtsaIVfkeownoQNbTj78VemUjKh08ZYRbf18'; -} -function pexels_get($url) { - $ch = curl_init(); - curl_setopt_array($ch, [ - CURLOPT_URL => $url, - CURLOPT_RETURNTRANSFER => true, - CURLOPT_HTTPHEADER => [ 'Authorization: '. pexels_key() ], - CURLOPT_TIMEOUT => 15, - ]); - $resp = curl_exec($ch); - $code = curl_getinfo($ch, CURLINFO_HTTP_CODE); - curl_close($ch); - if ($code >= 200 && $code < 300 && $resp) return json_decode($resp, true); - return null; -} -function download_to($srcUrl, $destPath) { - $data = file_get_contents($srcUrl); - if ($data === false) return false; - if (!is_dir(dirname($destPath))) mkdir(dirname($destPath), 0775, true); - return file_put_contents($destPath, $data) !== false; -} diff --git a/index.php b/index.php index bbf1012..82c4dc1 100644 --- a/index.php +++ b/index.php @@ -1,4 +1,3 @@ -
@@ -48,22 +47,17 @@