Advertisement
Guest User

Untitled

a guest
Feb 22nd, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.20 KB | None | 0 0
  1. <?php
  2. $xml = simplexml_load_file('http://g1.globo.com/dynamo/economia/rss2.xml') or die("erro carregar arquivo");
  3.  
  4. foreach ($xml->channel->item as $noticia) {
  5. $noticia->pubDate = date('d/m/Y');
  6.  
  7. echo "
  8. <li>
  9. <div class="timeline-badge"><i class="fa fa-check"></i>
  10. </div>
  11. <div class="timeline-panel">
  12. <div class="timeline-heading">
  13. <p><small class="text-muted"><i class="fa fa-clock-o"></i> $noticia->pubDate</small>
  14. </p>
  15. </div>
  16.  
  17. <div class="timeline-body">
  18. <a href="$noticia->link" target="_blank">$noticia->title</a><br>
  19. </div>
  20. </div>
  21. </li>
  22. ";
  23. }
  24. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement