“;
while ($l = mysql_fetch_array($r, MYSQL_ASSOC)) {
$post_name = $l[‘post_name’];
$post_title = $l[‘post_title’];
$thumbfile = $photodir.$post_name.”.jpg”;
if (file_exists($thumbfile)) {
$thumbweb = $photoweb.$post_name.”.jpg”;
if (($count % 5) == 0) {
echo “

“;
}
$post_datearr = explode(” “, $l[‘post_date’]);
$post_ymd = $post_datearr[0];
$post_ymdarr = explode(“-“, $post_ymd);
$year = $post_ymdarr[0];
$month = $post_ymdarr[1];
$day = $post_ymdarr[2];

$url = “https://oviedo.for91days.com/”.$year.”/”.$month.”/”.$day.”/”.$post_name.”/”;

echo “

$thumbweb

“;
$count++;
if (($count % 5) == 0) {
echo “

“;
}
}
if ($count >= 25) { break; }
if ($count == 5) {
echo “

Photos and Articles

“;
$count += 2;
} elseif ($count == 13) {
echo “

From 91 Days in Oviedo

“;
$count += 2;
}
}
echo “

For 91 Days we lived in Oviedo, the capital of Asturias. An ancient, noble city surrounded by unbelievable nature, Oviedo provided a wonderful base for three months of hiking, sight-seeing and culture. This was the first location in our 91 day travel project, and we couldn’t have picked a better place to start. Begin reading from the beginning of our journey, or skip to the end. Visit the comprehensive index of everything we wrote about, or just check out a few posts selected at random, below:

“;

$q = “select ID, post_name, post_title, post_date, post_content from wp_posts where post_status = ‘publish’ and post_type = ‘post’ order by rand() limit 3”;
if (!$r = mysql_query($q)) {
echo “Problem executing $q\n”;
exit();
}
while ($l = mysql_fetch_array($r, MYSQL_ASSOC)) {
$post_title = $l[‘post_title’];
$post_content = $l[‘post_content’];
$post_datetime = $l[‘post_date’];
$post_name = $l[‘post_name’];
$post_timestr = strtotime($post_datetime);

$linkdate = date(“y/m/d”, $post_timestr);
$pubdate = date (“M d, Y”, $post_timestr);

// get the image
$img_src = “https://for91days.com/photos/Thumbs/”.$post_name.”.jpg”;

$excerpt_begin = ““;
$excerpt_end = ““;
$excerpt_beginpos = strpos($post_content, $excerpt_begin);
if ($excerpt_beginpos) {
$excerpt_beginpos += strlen($excerpt_begin);
$trimmed_content = substr($post_content, $excerpt_beginpos);
$excerpt_endpos = strpos($trimmed_content, $excerpt_end);
$trimmed_content = substr($trimmed_content, 0, $excerpt_endpos);
$trimmed_content = strip_tags($trimmed_content);
if (substr($trimmed_content, -3) != ‘…’) {
$trimmed_content .= “…”;
} elseif (substr($trimmed_content, -1) == ‘.’) {
$trimmed_content = substr($trimmed_content, 0, -1);
}
} else {
$paragraphs = explode(“\n”, strip_tags($post_content));
$real_paragraphs = array();
foreach($paragraphs as $key => $paragraph_text) {
if (trim($paragraph_text)) {
$real_paragraphs[] = trim($paragraph_text);
}
}
$trimmed_content = $real_paragraphs[0];
}
$post_link = “https://oviedo.for91days.com/$linkdate/$post_name”;

echo ”

“;
}

?>

For 91 Days in Oviedo – The E-Book

We’ve made the effort to convert our blog about Oviedo and Asturias into an e-book. For 91 Days in Oviedo contains all of our articles and a selection of over 150 of our best pictures. With an index sorted by category, links to the original blog posts, and cross-references spread throughout, the e-book is a perfect companion for a trip to Oviedo.

cover ad

Amazon Kindle

Direct Download (PDF, MOBI)

For just a few bucks, you can download your own copy of the book for use on your e-reader or computer, giving you access to our anecdotes and articles wherever you are, without having to connect to the internet. And, buying the e-book is a great way to support our project… take a look at some sample pages from the PDF.

oviedo ebook sample1oviedo ebook sample2
oviedo ebook sample3oviedo ebook sample4