diff --git a/.htaccess b/.htaccess
index e2bbc23..bb060fb 100644
--- a/.htaccess
+++ b/.htaccess
@@ -2,17 +2,17 @@ DirectoryIndex index.php index.html
Options -Indexes
Options -MultiViews
-RewriteEngine On
+#RewriteEngine On
-# 0) Serve existing files/directories as-is
-RewriteCond %{REQUEST_FILENAME} -f [OR]
-RewriteCond %{REQUEST_FILENAME} -d
-RewriteRule ^ - [L]
+## 0) Serve existing files/directories as-is
+#RewriteCond %{REQUEST_FILENAME} -f [OR]
+#RewriteCond %{REQUEST_FILENAME} -d
+#RewriteRule ^ - [L]
-# 1) Internal map: /page or /page/ -> /page.php (if such PHP file exists)
-RewriteCond %{REQUEST_FILENAME}.php -f
-RewriteRule ^(.+?)/?$ $1.php [L]
+## 1) Internal map: /page or /page/ -> /page.php (if such PHP file exists)
+#RewriteCond %{REQUEST_FILENAME}.php -f
+#RewriteRule ^(.+?)/?$ $1.php [L]
-# 2) Optional: strip trailing slash for non-directories (keeps .php links working)
-RewriteCond %{REQUEST_FILENAME} !-d
-RewriteRule ^(.+)/$ $1 [R=301,L]
+## 2) Optional: strip trailing slash for non-directories (keeps .php links working)
+#RewriteCond %{REQUEST_FILENAME} !-d
+#RewriteRule ^(.+)/$ $1 [R=301,L]
diff --git a/api.php b/api.php
new file mode 100644
index 0000000..744eb8b
--- /dev/null
+++ b/api.php
@@ -0,0 +1,25 @@
+ $embedUrl, 'source' => 'youtube-search']);
+} else {
+ // Fallback if no video is found
+ echo json_encode(['videoUrl' => 'https://www.youtube.com/embed/dQw4w9WgXcQ', 'source' => 'fallback']);
+}
\ No newline at end of file
diff --git a/assets/css/custom.css b/assets/css/custom.css
new file mode 100644
index 0000000..1e1b8e6
--- /dev/null
+++ b/assets/css/custom.css
@@ -0,0 +1,35 @@
+body {
+ background-color: #F8F9FA;
+ font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
+}
+
+h1, h2, h3, h4, h5, h6 {
+ font-family: Georgia, 'Times New Roman', serif;
+}
+
+.gradient-bg {
+ background: linear-gradient(45deg, #0D6EFD, #6F42C1);
+ color: white;
+}
+
+.video-container {
+ position: relative;
+ padding-bottom: 56.25%;
+ height: 0;
+ overflow: hidden;
+ max-width: 100%;
+ background: #000;
+ border-radius: 0.375rem;
+}
+
+.video-container iframe {
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+}
+
+.btn-regenerate {
+ display: none;
+}
diff --git a/assets/js/main.js b/assets/js/main.js
new file mode 100644
index 0000000..ce39bcc
--- /dev/null
+++ b/assets/js/main.js
@@ -0,0 +1,62 @@
+document.addEventListener('DOMContentLoaded', function () {
+ const searchForm = document.getElementById('searchForm');
+ const videoContainer = document.getElementById('videoContainer');
+ const regenerateBtn = document.getElementById('regenerateBtn');
+ const yearInput = document.getElementById('yearInput');
+ let lastSearchedYear = '';
+
+ function showSpinner() {
+ videoContainer.innerHTML = `
`;
+ }
+
+ function showError(message) {
+ videoContainer.innerHTML = `${message}
`;
+ regenerateBtn.style.display = 'none';
+ }
+
+ function displayVideo(videoUrl) {
+ if (videoUrl.includes('youtube.com')) {
+ videoContainer.innerHTML = ``;
+ } else {
+ videoContainer.innerHTML = ``;
+ }
+ regenerateBtn.style.display = 'block';
+ }
+
+ async function fetchAndDisplayAd(year) {
+ lastSearchedYear = year;
+ showSpinner();
+ regenerateBtn.style.display = 'none';
+
+ try {
+ const response = await fetch(`api.php?year=${year}`);
+ if (!response.ok) {
+ throw new Error('Network response was not ok.');
+ }
+ const data = await response.json();
+
+ if (data.videoUrl) {
+ displayVideo(data.videoUrl);
+ } else {
+ showError('No video found for this year. Please try another.');
+ }
+ } catch (error) {
+ console.error('Error fetching ad:', error);
+ showError('Failed to fetch video. Please try again later.');
+ }
+ }
+
+ searchForm.addEventListener('submit', function (e) {
+ e.preventDefault();
+ const year = yearInput.value;
+ if (year) {
+ fetchAndDisplayAd(year);
+ }
+ });
+
+ regenerateBtn.addEventListener('click', function () {
+ if (lastSearchedYear) {
+ fetchAndDisplayAd(lastSearchedYear);
+ }
+ });
+});
\ No newline at end of file
diff --git a/assets/pasted-20251002-221007-1e6bf176.png b/assets/pasted-20251002-221007-1e6bf176.png
new file mode 100644
index 0000000..dacf361
Binary files /dev/null and b/assets/pasted-20251002-221007-1e6bf176.png differ
diff --git a/assets/pasted-20251002-221240-c33f67e2.png b/assets/pasted-20251002-221240-c33f67e2.png
new file mode 100644
index 0000000..84e28b7
Binary files /dev/null and b/assets/pasted-20251002-221240-c33f67e2.png differ
diff --git a/assets/pasted-20251002-221244-be0b2294.png b/assets/pasted-20251002-221244-be0b2294.png
new file mode 100644
index 0000000..84e28b7
Binary files /dev/null and b/assets/pasted-20251002-221244-be0b2294.png differ
diff --git a/assets/pasted-20251002-221903-780a3d7a.png b/assets/pasted-20251002-221903-780a3d7a.png
new file mode 100644
index 0000000..f380f17
Binary files /dev/null and b/assets/pasted-20251002-221903-780a3d7a.png differ
diff --git a/assets/pasted-20251002-221906-c6d7e120.png b/assets/pasted-20251002-221906-c6d7e120.png
new file mode 100644
index 0000000..f380f17
Binary files /dev/null and b/assets/pasted-20251002-221906-c6d7e120.png differ
diff --git a/includes/pexels.php b/includes/pexels.php
new file mode 100644
index 0000000..0c04a85
--- /dev/null
+++ b/includes/pexels.php
@@ -0,0 +1,25 @@
+ 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 7205f3d..005000a 100644
--- a/index.php
+++ b/index.php
@@ -1,150 +1,48 @@
-
-
+
-
-
- New Style
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+ adstoday
+
+
+
+
+
+
+
+
+
+
-
-
-
Analyzing your requirements and generating your website…
-
- Loading…
-
-
= ($_SERVER['HTTP_HOST'] ?? '') === 'appwizzy.com' ? 'AppWizzy' : 'Flatlogic' ?> AI is collecting your requirements and applying the first changes.
-
This page will update automatically as the plan is implemented.
-
Runtime: PHP = htmlspecialchars($phpVersion) ?> — UTC = htmlspecialchars($now) ?>
+
+
+
+
Ad Archive
+
Search for vintage video ads by year.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
-
+