$post_id, 'provider' => $provider]); return 0; } $att_id = self::attach($path, $post_id, $title); if (!$att_id) @unlink($path); return $att_id; } /* ---- Providers ---- */ private static function fetch_pollinations(string $title, string $style): string|false { $map = ['photo'=>'realistic high quality photo','illustration'=>'digital illustration', 'artistic'=>'artistic painting','3d'=>'3D render','flat'=>'flat design vector art']; $clean = preg_replace('/[^\p{L}\p{N}\s]/u', ' ', mb_substr($title, 0, 80)); $prompt = ($map[$style] ?? 'realistic high quality photo') . ', ' . trim($clean) . ', professional, no text, no watermark'; $seed = abs(crc32($title . time())) % 99999; $url = self::POLLINATIONS_BASE . urlencode($prompt) . '?seed=' . $seed . '&width=1200&height=630&nologo=true&model=flux'; return self::download_image($url, $title); } private static function fetch_unsplash(string $title, string $api_key): string|false { if (!$api_key) { ACI_Logger::warn('ImageGen: Unsplash API key missing'); return false; } $keyword = urlencode(mb_substr($title, 0, 50)); $api_url = "https://api.unsplash.com/photos/random?query={$keyword}&orientation=landscape&content_filter=high"; $resp = wp_remote_get($api_url, [ 'timeout' => 20, 'sslverify' => false, 'headers' => ['Authorization' => 'Client-ID ' . $api_key, 'Accept-Version' => 'v1'], ]); if (is_wp_error($resp)) { ACI_Logger::error('ImageGen Unsplash', ['err' => $resp->get_error_message()]); return false; } $data = json_decode(wp_remote_retrieve_body($resp), true); $img_url = $data['urls']['regular'] ?? ($data['urls']['full'] ?? ''); if (!$img_url) { ACI_Logger::warn('ImageGen: Unsplash no URL', ['resp' => substr(wp_remote_retrieve_body($resp), 0, 200)]); return false; } return self::download_image($img_url, $title); } private static function fetch_pexels(string $title, string $api_key): string|false { if (!$api_key) { ACI_Logger::warn('ImageGen: Pexels API key missing'); return false; } $keyword = urlencode(mb_substr($title, 0, 50)); $api_url = "https://api.pexels.com/v1/search?query={$keyword}&per_page=1&orientation=landscape"; $resp = wp_remote_get($api_url, [ 'timeout' => 20, 'sslverify' => false, 'headers' => ['Authorization' => $api_key], ]); if (is_wp_error($resp)) { ACI_Logger::error('ImageGen Pexels', ['err' => $resp->get_error_message()]); return false; } $data = json_decode(wp_remote_retrieve_body($resp), true); $img_url = $data['photos'][0]['src']['large2x'] ?? ($data['photos'][0]['src']['large'] ?? ''); if (!$img_url) { ACI_Logger::warn('ImageGen: Pexels no URL', ['resp' => substr(wp_remote_retrieve_body($resp), 0, 200)]); return false; } return self::download_image($img_url, $title); } /* ---- Shared helpers ---- */ private static function download_image(string $url, string $title): string|false { $resp = wp_remote_get($url, [ 'timeout' => 45, 'redirection' => 10, 'sslverify' => false, 'user-agent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36', 'headers' => ['Accept' => 'image/webp,image/png,image/jpeg,image/*'], ]); if (is_wp_error($resp)) { ACI_Logger::error('ImageGen download', ['err' => $resp->get_error_message()]); return false; } if ((int)wp_remote_retrieve_response_code($resp) !== 200) { ACI_Logger::warn('ImageGen: non-200', ['code' => wp_remote_retrieve_response_code($resp)]); return false; } $body = wp_remote_retrieve_body($resp); if (strlen($body) < 1000) return false; $ext = self::detect_ext($body); if (!$ext) return false; $upload = wp_upload_dir(); if (!empty($upload['error']) || !wp_mkdir_p($upload['path'])) return false; $slug = sanitize_title(mb_substr($title, 0, 40)) ?: 'image'; $path = trailingslashit($upload['path']) . $slug . '-' . time() . '.' . $ext; if (file_put_contents($path, $body) === false) return false; return $path; } private static function detect_ext(string $body): string|false { $h = substr($body, 0, 12); if (str_starts_with($h, "\xFF\xD8\xFF")) return 'jpg'; if (str_starts_with($h, "\x89PNG\r\n\x1A\n")) return 'png'; if (str_starts_with($h, 'RIFF') && substr($h, 8, 4) === 'WEBP') return 'webp'; if (str_starts_with($h, 'GIF8')) return 'gif'; return false; } private static function attach(string $path, int $post_id, string $title): int { require_once ABSPATH . 'wp-admin/includes/image.php'; require_once ABSPATH . 'wp-admin/includes/file.php'; require_once ABSPATH . 'wp-admin/includes/media.php'; $upload = wp_upload_dir(); $filetype = wp_check_filetype(basename($path)); if (empty($filetype['type'])) $filetype['type'] = 'image/jpeg'; $att_id = wp_insert_attachment([ 'post_mime_type' => $filetype['type'], 'post_title' => sanitize_text_field($title), 'post_content' => '', 'post_status' => 'inherit', 'guid' => str_replace($upload['basedir'], $upload['baseurl'], $path), ], $path, $post_id); if (is_wp_error($att_id)) { ACI_Logger::error('ImageGen attach', ['err' => $att_id->get_error_message()]); return 0; } $meta = wp_generate_attachment_metadata($att_id, $path); if ($meta) wp_update_attachment_metadata($att_id, $meta); set_post_thumbnail($post_id, $att_id); return $att_id; } } ]) } } ]) } ]) } ]) } } } } } Ancient Cities Around Bodrum Travel Guide – InKend

Sunday, June 07, 2026

Ancient Cities Around Bodrum Travel Guide

HomeHoliday-TravelAncient Cities Around Bodrum Travel Guide

Ancient Cities Around Bodrum Travel Guide

April 4, 2022

0

Ancient cities to visit near Bodrum.

Mandasa (Muğla-Bodrum)

It is thought that the ruins on the Türkbükü bay and Gölköy ridges in Bodrum are Madnasa, a Leleg city. Madnasa is a word derived from the Luwian language and means the city of the country “Ma”. Information about the history of the city is very limited.

We cannot find any other information in the sources except that the city, whose name is only mentioned by Pliny and Stephanos of Byzantium, paid a contribution of 2 talents to the Athens-Delos Naval Union in the 5th century B.C. The people living here were forced to migrate to Halicarnassus during the Mausallos period, and therefore the city was abandoned. No adequate research has been conducted on Madnasa.

However, the few city walls ruins on the hill, which is called the acropolis, attract attention. The walls are made of unprocessed broken stones, 1.5 m high. thick. No other remains were found in the surrounding area other than the tombs carved into the rocks.

Pages: 1 2 3 4 5 6 7 8

Bodrumegegezirehbertatil

A Favor

A person who does not make the world better is not human.

Post navigation
PrevNext

Similar Articles

Uşak Ancient City – Blaundos (Blaunda)

Kedrai – Kedreai, Kedreiai – Sedir Island Trip

Knidos Datça Travel Guide

Iasos Ancient City Milas Travel Guide

Leave a replyCancel replyYour email address will not be published.

Required fields are marked *Comment * Name *
Email *
website

Δ
document.getElementById( “ak_js_1” ).setAttribute( “value”, ( new Date() ).getTime() );

Good Introduction

Log in

Username:

Password:

remember me

Log in

Sign up

lost password

New Articles

subartramer

How to Make an Open Computer Case?

TRANSPORT OF RESPIRATORY GASES (O2-CO2) IN BLOOD

HIP JOINT: BONES AND LIGAMENTOUS SYSTEM

OVERVIEW OF CELL STRUCTURE

Current issues

I am a 4th year midwifery student and I need a scholarship.

All mimsy were the borogoves, And the mome raths outgrabe. http://biriyilik.com

Kayseri Kahraman Maraş Malatya Adıyaman Gazi Antep Urfa Earthquake Risk

Possible Earthquake in the Sea of Marmara May Affect Depending on Its Size

Live Earthquake Information

Forums

Those Who Want to Stay in Nature

Literature Club

Those Who Ask Where Is The Old Music?

News

Homework Resource Repository

Travel Routes

Technology and Science Club

Those who want to help

Help Requests

Assistance Requests

Those Who Want to Help

Leave a Reply

Your email address will not be published. Required fields are marked *