Skip to content

Instantly share code, notes, and snippets.

@jlittlejohn
Created May 31, 2013 14:41
Show Gist options
  • Save jlittlejohn/5685454 to your computer and use it in GitHub Desktop.
Save jlittlejohn/5685454 to your computer and use it in GitHub Desktop.
PHP: SimpleXML Class
<?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