This was not found.

'); } function make_gallery() { if(file_exists('gallery.html')) { return True; } $flickr = json_decode(file_get_contents('.flickr.json'), TRUE); $flickr['method'] = "flickr.photosets.getPhotos"; $flickr['extras'] = "media,url_m,url_l"; $flickr['per_page'] = "500"; $flickr['format'] = "json"; $flickr['nojsoncallback'] = "1"; $url = sprintf('https://www.flickr.com/services/rest/?%s',http_build_query($flickr)); $r = json_decode(file_get_contents($url), TRUE); $photos = array(); foreach($r['photoset']['photo'] as $photo) { if($photo['media'] != 'photo') { continue; } $et = sprintf( '%s
%s
', $photo['url_l'], // href $photo['url_m'], // src $photo['width_m'], // width $photo['height_m'], // height '', // alt $photo['title'] // caption ); array_push($photos, $et); } $gs = ' '; $t = sprintf( '%s', join("\n", $photos), $gs ); file_put_contents('gallery.html', $t); } class Page { public $name; private $html; private $json; private $inserts; public function __construct($name) { $this->name = $name; $this->html = sprintf("page/%s.html", $name); $this->json = sprintf("page/%s.json", $name); $this->inserts = array( 'INSERT_GALLERY_HERE' => 'gallery.html' ); } public function exists() { if (file_exists($this->html) && file_exists($this->json)) { return True; } enotfound(); } public function meta() { global $org; global $site; $stat = stat($this->html); $meta = json_decode(file_get_contents($this->json), TRUE); $meta['author'] = &$org; $meta['publisher'] = &$org; $meta['dateModified'] = date("c", $stat['mtime']); $meta['datePublished'] = date("c", $stat['ctime']); $meta['copyrightYear'] = date("Y", $stat['mtime']); $meta['url'] = ('index' == $maybe) ? $site['url'] : sprintf("%s?%s", $site['url'], $maybe); $meta['@id'] = $meta['url']; $meta['@type'] = 'Article'; $meta['mainEntityOfPage'] = sprintf("%s#main", $meta['url']); if (!isset($meta['image']) or empty($meta['image'])) { $meta['image'] = $site['image']; } return $meta; } public function content(){ $c = file_get_contents($this->html); foreach($this->inserts as $insert => $fname ) { if (file_exists($fname)) { $c = str_replace($insert, file_get_contents($fname), $c); } } return $c; } } /* --- */ if(empty($_GET)) { $maybe = 'index'; } else { $maybe = array_pop(array_keys($_GET)); } $org = json_decode(file_get_contents('org.json'), TRUE); $site = json_decode(file_get_contents('site.json'), TRUE); $site['author'] = &$org; $site['publisher'] = &$org; $site['url'] = sprintf("%s/", rtrim($site['url'], '/')); make_gallery(); $page = new Page($maybe); $page->exists(); $meta = $page->meta(); $content = $page->content(); $site['mainEntity'] = &$meta; /* --- */ ?> <?php echo($meta['headline']); ?>