Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $xml = simplexml_load_file('http://g1.globo.com/dynamo/economia/rss2.xml') or die("erro carregar arquivo");
- foreach ($xml->channel->item as $noticia) {
- $noticia->pubDate = date('d/m/Y');
- echo "
- <li>
- <div class="timeline-badge"><i class="fa fa-check"></i>
- </div>
- <div class="timeline-panel">
- <div class="timeline-heading">
- <p><small class="text-muted"><i class="fa fa-clock-o"></i> $noticia->pubDate</small>
- </p>
- </div>
- <div class="timeline-body">
- <a href="$noticia->link" target="_blank">$noticia->title</a><br>
- </div>
- </div>
- </li>
- ";
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement