This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Work out when I’m available | |
// Manual, can set a date to use, e.g. 25th August | |
$date_available_manual = ''; | |
// If no date is set, just set it to two weeks time | |
$date_available_auto = date('jS F', strtotime('+2 week')); | |
// Assign variable to echo out |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Load in Flickr XML feed | |
$xml = simplexml_load_file('https://api.flickr.com/services/feeds/photos_public.gne?id=108874017@N08'); | |
// Check the feed | |
if (strlen($xml) == 0) { | |
// If the XML feed is empty (feed down) just display a link to Flickr | |
echo '<p>I quite like taking pictures. Check out <a href="https://www.flickr.com/photos/108874017@N08/" title="ItsRab on Flickr">my Flickr</a> for all my latest photos from all over the place. It’s just a hobby mind you.</p>'; | |
} else { | |
// Feed returned something, let’s show it! |