European Media independent journalism and documentary photography covering history, travel, culture and major events across the UK and Europe.
European Media independent journalism and documentary photography covering history, travel, culture and major events across the UK and Europe.
true, 'cookie_secure' => !empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off', 'cookie_samesite' => 'Lax' ]); header('Cache-Control: no-store'); $siteKey = 'YOUR_HCAPTCHA_SITE_KEY'; $secretKey = 'YOUR_HCAPTCHA_SECRET_KEY'; $recipient = 'daren@europeanmedia.co.uk'; /* Your host must permit this sender address. Configure domain email authentication through your host. */ $sender = 'daren@europeanmedia.co.uk'; $maxPhotoBytes = 5 * 1024 * 1024; if (empty($_SESSION['em_csrf'])) { $_SESSION['em_csrf'] = bin2hex(random_bytes(32)); } function escapeHtml(string $value): string { return htmlspecialchars($value, ENT_QUOTES, 'UTF-8'); } function postedText(string $key): string { $value = $_POST[$key] ?? ''; return is_string($value) ? trim($value) : ''; } function verifyCaptcha( string $token, string $secret, string $siteKey ): bool { if ($token === '' || !function_exists('curl_init')) { return false; } $handle = curl_init('https://api.hcaptcha.com/siteverify'); if ($handle === false) { return false; } curl_setopt_array($handle, [ CURLOPT_POST => true, CURLOPT_POSTFIELDS => http_build_query([ 'secret' => $secret, 'response' => $token, 'sitekey' => $siteKey ]), CURLOPT_HTTPHEADER => [ 'Content-Type: application/x-www-form-urlencoded' ], CURLOPT_RETURNTRANSFER => true, CURLOPT_CONNECTTIMEOUT => 5, CURLOPT_TIMEOUT => 15 ]); $response = curl_exec($handle); $status = curl_getinfo($handle, CURLINFO_HTTP_CODE); curl_close($handle); if (!is_string($response) || $status !== 200) { return false; } $result = json_decode($response, true); return is_array($result) && ($result['success'] ?? false) === true; } $errors = []; $success = false; $name = ''; $email = ''; $order = ''; $message = ''; if ($_SERVER['REQUEST_METHOD'] === 'POST') { $name = postedText('name'); $email = postedText('email'); $order = postedText('order'); $message = postedText('message'); if ( !hash_equals( $_SESSION['em_csrf'], postedText('csrf') ) ) { $errors[] = 'Your session expired. Refresh the page and try again.'; } if ($name === '' || strlen($name) > 150) { $errors[] = 'Please enter your name (up to 150 characters).'; } if ( strlen($email) > 254 || preg_match('/[\r\n]/', $email) || !filter_var($email, FILTER_VALIDATE_EMAIL) ) { $errors[] = 'Please enter a valid email address.'; } if (strlen($order) > 150) { $errors[] = 'Please shorten your order reference.'; } if ($message === '' || strlen($message) > 10000) { $errors[] = 'Please enter a message of up to 10,000 characters.'; } if (postedText('permission') !== 'yes') { $errors[] = 'Please confirm the permission statement.'; } if ( $siteKey === 'YOUR_HCAPTCHA_SITE_KEY' || $secretKey === 'YOUR_HCAPTCHA_SECRET_KEY' ) { $errors[] = 'The form is awaiting setup. Please email us directly.'; } if ( isset($_SESSION['em_last_sent']) && time() - $_SESSION['em_last_sent'] < 60 ) { $errors[] = 'Please wait one minute before sending another enquiry.'; } $attachment = null; $attachmentMime = ''; $attachmentName = ''; $file = $_FILES['photo'] ?? null; if ($file !== null) { if (!is_array($file) || !isset($file['error']) || !is_int($file['error'])) { $errors[] = 'Invalid photo upload.'; } elseif ($file['error'] !== UPLOAD_ERR_NO_FILE) { if ($file['error'] !== UPLOAD_ERR_OK) { $errors[] = 'The photo could not be uploaded. Maximum size: 5 MB.'; } elseif ( !is_string($file['tmp_name'] ?? null) || !is_uploaded_file($file['tmp_name']) ) { $errors[] = 'Invalid photo upload.'; } else { $tmp = $file['tmp_name']; $size = filesize($tmp); if ($size === false || $size < 1 || $size > $maxPhotoBytes) { $errors[] = 'Please upload a photo smaller than 5 MB.'; } elseif (!class_exists('finfo')) { $errors[] = 'Photo uploads are temporarily unavailable.'; } else { $types = [ 'image/jpeg' => 'jpg', 'image/png' => 'png', 'image/webp' => 'webp' ]; $info = new finfo(FILEINFO_MIME_TYPE); $mime = $info->file($tmp); $imageInfo = @getimagesize($tmp); if ( !isset($types[$mime]) || $imageInfo === false || ($imageInfo['mime'] ?? '') !== $mime ) { $errors[] = 'Please upload a genuine JPG, PNG or WebP photo.'; } else { $attachment = file_get_contents($tmp); if ($attachment === false) { $errors[] = 'The uploaded photo could not be read.'; $attachment = null; } else { $attachmentMime = $mime; $attachmentName = 'customer-photo.' . $types[$mime]; } } } } } } if (!$errors) { $token = postedText('h-captcha-response'); if (!verifyCaptcha($token, $secretKey, $siteKey)) { $errors[] = 'Please complete hCaptcha and try again.'; } } if (!$errors) { $boundary = 'em_' . bin2hex(random_bytes(20)); $text = "EUROPEAN MEDIA - PHOTO ENQUIRY\r\n\r\n"; $text .= "Name: {$name}\r\n"; $text .= "Email: {$email}\r\n"; $text .= "Order reference: {$order}\r\n\r\n"; $text .= "Message:\r\n{$message}\r\n\r\n"; $text .= "Customer confirmed permission to submit the photo.\r\n"; $headers = [ "From: European Media <{$sender}>", "Reply-To: {$email}", 'MIME-Version: 1.0', 'Content-Type: multipart/mixed; boundary="' . $boundary . '"' ]; $body = "--{$boundary}\r\n"; $body .= "Content-Type: text/plain; charset=UTF-8\r\n"; $body .= "Content-Transfer-Encoding: base64\r\n\r\n"; $body .= chunk_split(base64_encode($text)); if ($attachment !== null) { $body .= "--{$boundary}\r\n"; $body .= "Content-Type: {$attachmentMime}\r\n"; $body .= 'Content-Disposition: attachment; filename="' . $attachmentName . '"' . "\r\n"; $body .= "Content-Transfer-Encoding: base64\r\n\r\n"; $body .= chunk_split(base64_encode($attachment)); } $body .= "--{$boundary}--\r\n"; if (function_exists('mail') && mail( $recipient, 'European Media - Photo Enhancement Enquiry', $body, implode("\r\n", $headers) )) { $_SESSION['em_last_sent'] = time(); $_SESSION['em_sent_notice'] = true; $_SESSION['em_csrf'] = bin2hex(random_bytes(32)); header('Location: photo-contact.php'); exit; } else { $errors[] = 'We could not send your enquiry. Please email daren@europeanmedia.co.uk.'; } } } if (!empty($_SESSION['em_sent_notice'])) { $success = true; unset($_SESSION['em_sent_notice']); } ?> Upload Your Photo | European Media

EUROPEAN MEDIA

Upload Your Photo & Get in Touch

Tell us what you would like improved. Photo enhancement is £20 per suitable image.

Thank you. Your enquiry has been passed to our email system for delivery. We will reply to the email address you provided.

Already purchased through Payhip? Include your reference.

One JPG, PNG or WebP image, up to 5 MB. For larger originals, contact us to arrange a transfer.

Your enquiry and any attached photograph will be sent to European Media by email.

Prefer email? daren@europeanmedia.co.uk

European Media — Capturing Europe. Preserving Moments.

About European Media

European Media is an independent editorial project dedicated to documenting the people, places and events that shape the United Kingdom and Europe. Through original photography, first-hand reporting and carefully researched articles, the project aims to preserve stories that might otherwise be overlooked.

Every feature published on European Media is based on genuine visits, personal experience and documentary photography. Rather than relying on stock imagery or syndicated content, the focus is on producing original visual journalism that gives readers an authentic perspective on each location or event.

The project covers a broad range of subjects, including history, architecture, transport, culture, military heritage, museums, festivals, theatre, film, travel and major public events. From internationally recognised landmarks to lesser-known historical sites, European Media seeks to explain not only what can be seen today but also the stories behind it.

Photography remains at the heart of the project. Every image is carefully composed to capture the atmosphere, detail and character of a location. Alongside the photographs, readers will find informative articles that provide historical context, practical information and observations gathered during each visit.

As the archive continues to grow, European Media is developing into a substantial collection of editorial features covering destinations throughout the UK and beyond. New articles, reviews and photographic galleries are added regularly, creating a valuable resource for anyone with an interest in history, travel, architecture and contemporary culture.

European Media also provides accredited coverage of major festivals, exhibitions, performances and public events, offering readers an independent perspective supported by original photography and accurate reporting. Each assignment is approached with the same commitment to professionalism, impartiality and attention to detail.

Whether you are researching a destination, planning a visit or simply enjoying documentary photography, European Media offers an expanding collection of original editorial content designed to inform, inspire and encourage further exploration. Thank you for taking the time to visit the project and explore its growing archive of stories and images.

Copyright © European Media