<?php $url = "https://github.com/ronilaukkarinen/rolle.wtf/commits/master.atom"; $rss = simplexml_load_file($url); ?> <?php if ($rss) { ?> <p><a class="last-commit" href="<?php echo $rss->entry->link['href']; ?> ">Updated <?php $updatetime = aika(abs(strtotime($rss->entry->updated)), time()); if (!empty($updatetime)) { $updatetime = " " . aika(abs(strtotime($rss->entry->updated)), time() + 60) . " "; } else { $updatetime = " a moment "; } echo $updatetime; ?> ago: <i><?php echo $rss->entry->title; ?> </i>.</a></p> <?php } ?> </p>
* @since 4.04.2014 */ if (file_exists($_SERVER['HOME'] . '/rolle.wtf/vendor')) { include $_SERVER['HOME'] . '/rolle.wtf/vendor/autoload.php'; } else { include $_SERVER['HOME'] . '/rolle.wtf.deploy/vendor/autoload.php'; } use MetzWeb\Instagram\Instagram; $instagram = new Instagram('YOUR_API_KEY'); // User ID (find your ID: http://otzberg.net/iguserid) $userID = YOUR_USER_ID; // Get the most recent public media published by the user $media = $instagram->getUserMedia($userID, 1); foreach ($media->data as $data) { ?> <header class="item-header" style="background-image: url('<?php echo $data->images->low_resolution->url; ?> ');"> <div class="shade"></div> <p>Last Instagram photo taken <?php echo aika(abs(strtotime(date('d.m.Y H:i', $data->caption->created_time))), time() + 60); ?> ago.</p> </header> <?php }
<iframe src="http://peikko.us/irclog-small.php" frameborder="0"></iframe> <?php // Tests: include 'time-since.php'; // ini_set('display_errors', 0); // error_reporting(0); $lastactive = file_get_contents('http://www.peikko.us/lastactive.log'); $lastactivetime = aika(abs($lastactive - 280), time()); if ($lastactivetime == "0 minutes") { $lastactivetime = "a moment"; } $lastactivetime = "<p>Last active " . $lastactivetime . " ago.</p>"; echo $lastactivetime;
<p>Last task added <?php $a = 0; foreach ($obj as $data) { $b = 0; foreach ($data->data as $taskdata) { krsort($taskdata->uncompleted); $c = 0; foreach ($taskdata->uncompleted as $task) { // echo $task->content; $timeadded = aika(abs(strtotime($task->date_added . " GMT")), time()); if (empty($timeadded)) { $timeadded = " a moment "; } else { $timeadded = " " . aika(abs(strtotime($task->date_added . " GMT")), time()) . " "; } echo $timeadded; if (++$c == 1) { break; } } if (++$b == 1) { break; } } if (++$a == 1) { break; } } ?>
foreach ($artistxml->artist->image as $img) { if ($img['size'] == "mega") { ?> <header class="item-header" style="background-image: url('<?php echo $img; ?> ');"> <div class="shade"></div> <?php $nptime = aika($trackArray[0], time()); if (empty($nptime)) { $nptime = " a moment "; } elseif ($nptime == "0 minutes" || $nptime == " 0 minutes ") { $nptime = " a moment "; } else { $nptime = " " . aika($trackArray[0], time()) . " "; } ?> <p>A song played <?php echo $nptime; ?> ago.</p> </header> <?php } } } }