diff --git a/assets/pasted-20250924-152027-2c3eed44.jpg b/assets/pasted-20250924-152027-2c3eed44.jpg new file mode 100644 index 0000000..6502c7c Binary files /dev/null and b/assets/pasted-20250924-152027-2c3eed44.jpg differ diff --git a/assets/pasted-20250924-152614-59543528.jpg b/assets/pasted-20250924-152614-59543528.jpg new file mode 100644 index 0000000..6d35df5 Binary files /dev/null and b/assets/pasted-20250924-152614-59543528.jpg differ diff --git a/assets/vm-shot-2025-09-24T15-19-53-660Z.jpg b/assets/vm-shot-2025-09-24T15-19-53-660Z.jpg new file mode 100644 index 0000000..910dfb5 Binary files /dev/null and b/assets/vm-shot-2025-09-24T15-19-53-660Z.jpg differ diff --git a/assets/vm-shot-2025-09-24T15-20-18-342Z.jpg b/assets/vm-shot-2025-09-24T15-20-18-342Z.jpg new file mode 100644 index 0000000..6502c7c Binary files /dev/null and b/assets/vm-shot-2025-09-24T15-20-18-342Z.jpg differ diff --git a/assets/vm-shot-2025-09-24T15-25-01-869Z.jpg b/assets/vm-shot-2025-09-24T15-25-01-869Z.jpg new file mode 100644 index 0000000..acb87e5 Binary files /dev/null and b/assets/vm-shot-2025-09-24T15-25-01-869Z.jpg differ diff --git a/assets/vm-shot-2025-09-24T15-25-57-667Z.jpg b/assets/vm-shot-2025-09-24T15-25-57-667Z.jpg new file mode 100644 index 0000000..6d35df5 Binary files /dev/null and b/assets/vm-shot-2025-09-24T15-25-57-667Z.jpg differ diff --git a/index.php b/index.php index 6f7ffab..4ec6e0b 100644 --- a/index.php +++ b/index.php @@ -4,31 +4,79 @@ declare(strict_types=1); @error_reporting(E_ALL); @date_default_timezone_set('UTC'); -$phpVersion = PHP_VERSION; -$now = date('Y-m-d H:i:s'); +$happy_things = [ + "Why do programmers prefer dark mode? Because light attracts bugs.", + "A programmer puts two glasses on his bedside table. One with water if he gets thirsty, and one empty in case he doesn't.", + "['hip', 'hip']", + "To understand what recursion is, you must first understand recursion.", + "I'm not lazy, I'm just on energy-saving mode.", + "Why did the programmer quit his job? Because he didn't get arrays.", + "A programmer's wife tells him: 'Go to the store and buy a loaf of bread. If they have eggs, buy a dozen.' The programmer returns with 12 loaves of bread.", + "There are 10 types of people in the world: those who understand binary, and those who don't.", + "Documentation is like sex: when it's good, it's very, very good; and when it's bad, it's better than nothing.", + "The best thing about a boolean is even if you are wrong, you are only off by a bit.", + "A programmer had a problem. He decided to use Java. Now he has a ProblemFactory.", + "Don't worry if it doesn't work right. If everything did, you'd be out of a job.", + "Programming is like writing a book... if you miss a single comma on page 1, the whole story makes no sense.", + "The six stages of debugging: 1. That can't happen. 2. It shouldn't happen. 3. It did happen. 4. Why did it happen? 5. Oh, I see. 6. How did that ever work?", + "Talk is cheap. Show me the code.", + "It's not a bug, it's an undocumented feature.", + "Weeks of programming can save you hours of planning.", + "One man's crappy software is another man's full-time job." +]; + +$happy_thing = $happy_things[array_rand($happy_things)]; + +// Fetch a background image from Pexels +$bg_image_url = 'assets/pasted-20250924-152027-2c3eed44.jpg'; // Fallback image +$pexels_api_key = getenv('PEXELS_KEY') ?: 'Vc99rnmOhHhJAbgGQoKLZtsaIVfkeownoQNbTj78VemUjKh08ZYRbf18'; +$query = 'developer desk'; +$pexels_url = 'https://api.pexels.com/v1/search?query=' . urlencode($query) . '&orientation=landscape&per_page=1'; + +$ch = curl_init(); +curl_setopt_array($ch, [ + CURLOPT_URL => $pexels_url, + CURLOPT_RETURNTRANSFER => true, + CURLOPT_HTTPHEADER => ['Authorization: ' . $pexels_api_key], + CURLOPT_TIMEOUT => 15, +]); +$response = curl_exec($ch); +$http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE); +curl_close($ch); + +if ($http_code >= 200 && $http_code < 300 && $response) { + $data = json_decode($response, true); + if (!empty($data['photos'])) { + $photo = $data['photos'][0]; + $src = $photo['src']['large2x'] ?? $photo['src']['large'] ?? $photo['src']['original']; + $bg_image_url = $src; + } +} ?> - New Style + How to Make a Developer Happy + - +
-

Analyzing your requirements and generating your website…

-
- Loading… +

How to Make a Developer Happy

+
+

Ready for some developer happiness?

+ +
+ -

AI is collecting your requirements and applying the first changes.

-

This page will update automatically as the plan is implemented.

-

Runtime: PHP — UTC

+ - + \ No newline at end of file