Created
May 31, 2013 14:41
-
-
Save jlittlejohn/5685454 to your computer and use it in GitHub Desktop.
PHP: SimpleXML Class
This file contains hidden or 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 flickr Public Feed */ | |
$xml = simplexml_load_file('http://api.flickr.com/services/feeds/photos_public.gne'); | |
if(is_object($xml)){ | |
/* Get each entry and echo the content tag */ | |
foreach($xml->entry as $photo) echo $photo->content; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment