Baffled on xampp to ubunto and page doesnt show corrent


Hi. im baffled on this.

boss wants a traffic feed for the office so im using SimplePie to grab rss feeds and the google maps traffic overlay as a view of the roads. The trouble is when i do it via xampp locally it looks fine, but when i load into onto our local webserver (ubuntu 18.04 with apache) it only shows a small line and cant figure out why? any help is appreciated


// Include the SimplePie library

// Because we’re using multiple feeds, let’s just set the headers here.
header(‘Content-type:text/html; charset=utf-8’);

// These are the feeds we want to use
$feeds = array(’,’,

// This array will hold the items we’ll be grabbing.
$first_items = array();

// Let’s go through the array, feed by feed, and store the items we want.
foreach ($feeds as $url)
// Use the long syntax
$feed = new SimplePie();

// How many items per feed should we try to grab?
$items_per_feed = 5;

// As long as we’re not trying to grab more items than the feed has, go through them one by one and add them to the array.
for ($x = 0; $x < $feed->get_item_quantity($items_per_feed); $x++)
$first_items[] = $feed->get_item($x);

// We're done with this feed, so let's release some memory.


// We need to sort the items by date with a user-defined sorting function. Since usort() won’t accept “SimplePie::sort_items”, we need to wrap it in a new function.
function sort_items($a, $b)
return SimplePie::sort_items($a, $b);

// Now we can sort $first_items with our custom sorting function.
usort($first_items, “sort_items”);

// Begin the (X)HTML page.

Traffic Layer body { height: 100%; font:12px/1.4em Verdana, sans-serif; color:#333; background-color:#fff; }

a {
padding:0 1px;

a:hover {

div.header {
border-bottom:1px solid #999;

div.item {
border-bottom:1px solid #999;
div#site {
padding:5px 0;
/* Always set the map height explicitly to define the size of the div
* element that contains the map. /
#map {
height: 100%;
Optional: Makes the sample page fill the window. */
html, body {
height: 100%;
margin: 0;
padding: 0;
footnote, p{
font:9px/1.4em Verdana, sans-serif;

<div class="row">
<div class="col-md-2">
    <!-- BOF Simple Pie News Feed Info -->
<?php foreach($first_items as $item): $feed = $item->get_feed(); ?>
  <div class="chunk">
  	<h6><b><?php echo html_entity_decode($item->get_title(), ENT_QUOTES, 'UTF-8'); ?></a></b></h6>

  	<?php echo $item->get_content(); ?>

  	<?php if ($enclosure = $item->get_enclosure()): ?>
  		<?php echo $enclosure->native_embed(array(

  		)); ?>
  	<?php endif; ?>

  	<p class="footnote">Source: <?php echo $feed->get_title(); ?></a> | <?php echo $item->get_date('j M Y | g:i a'); ?></p>
<?php endforeach; ?>
  	<!-- EOF Simple Pie News Feed Info -->	</div>
<div class="col-md-10">
    <!-- BOF Map Info -->




This is what it looks like locally via xampp