looking for a way to speed up the loading time of my page without compromising the web page
<p>I have made a webpage for a livestreaming layout, is there a way to speed up the loading process? because it loads a bit to slow to my standards, it takes about 5-10 seconds to load, wich is way to slow, i rewrote a lot of the code, to make the methods more universal, but the process still takes up way to long, perhaps the problem is with the first method (value_in) but i don't realy know for sure.</p>

<pre><code>Hello and welcome to the Livestream page for the broken diamond community here you can find all our content creator's livestream pages to watch them game. you can chat with other members and even them! We always welcome new followers and will love to hear about suggestions for games, in game tips and all those opinions we know you have to share!

    &lt;?php
    header('Refresh: 60');
    define('ELEMENT_CONTENT_ONLY', true);
    define('ELEMENT_PRESERVE_TAGS', false);

    function value_in($element_name, $xml, $content_only = true) 
    {
        if ($xml == false)
        {
            return false;
        }
        $found = preg_match('#&lt;'.$element_name.'(?:\s+[^&gt;]+)?&gt;(.*?)'.'&lt;/'.$element_name.'&gt;#s', $xml, $matches);
        if ($found != false) 
        {
            if ($content_only) 
            {
                return $matches[1];  //ignore the enclosing tags
            }
           else 
           {
                return $matches[0];  //return the full pattern match
            }
        }
        // No match found: return false.
        return false;
    }

    loadpage();
    function loadpage()
    {
          echo "&lt;table cellpadding=\"0\" cellspacing=\"0\" style=\"width: 95%\" &gt;";
          echo "&lt;tr class=\"info-row\" bgcolor=#252525 style=\"color:white;  height: 15px;\"&gt;";
          echo "&lt;td style=\"width: 14%; height: 10px; padding-left: 5px;\"&gt;&lt;b&gt;Preview&lt;/b&gt;&lt;/td&gt;";
          echo "&lt;td style=\"width: 10%; height: 10px; padding-left: 5px;\"&gt;&lt;b&gt;Live&lt;/b&gt;&lt;/td&gt;";
          echo "&lt;td style=\"width: 36%; height: 10px; padding-left: 5px;\"&gt;&lt;b&gt;Stream&lt;/b&gt;&lt;/td&gt;";
          echo "&lt;td style=\"width: 10%; height: 10px; padding-left: 5px;\"&gt;&lt;b&gt;Viewers&lt;/b&gt;&lt;/td&gt;";
          echo "&lt;td style=\"width: 10%; height: 10px; padding-left: 5px;\"&gt;&lt;b&gt;Time online&lt;/b&gt;&lt;/td&gt;";
          echo "&lt;/tr&gt;";
          addrow(107473,10,"Osuryn","Osuryn is streaming random games live",false);
          addrow(210320,28,"Dennojj","Dennojj is streaming PS3 games",true);
          echo "&lt;/table&gt;";
    }

    function addrow($streamID, $streamPage , $streamName , $streamSlogan, $odd)
    {
         if ($odd)
         {
                echo "&lt;tr class=\"content-row online\" id=\"958\" bgcolor=#A7A7A7&gt;";
         }
         else
         {
                echo "&lt;tr class=\"content-row online\" id=\"958\" bgcolor=#BFBFBF&gt;";
         }
         echo "&lt;td style=\"width: 14%;\"&gt;&lt;img src=\"http://img.hw.own3d.tv/live/live_tn_".$streamID."_.jpg\" style=\"height: 72px;\" \&gt;&lt;/td&gt;";
         echo "&lt;td style=\"width: 10%; padding-left: 5px;\"&gt;&lt;br&gt;&lt;br&gt;&lt;b&gt;".getLiveStatus($streamID)."&lt;/b&gt;&lt;/td&gt;";
         echo "&lt;td style=\"width: 36%; vertical-align: top; padding-top: 6px; padding-right: 6px;\"&gt;";
         echo "&lt;div&gt;&lt;br&gt;&lt;a href=\"http://brokendiamond.org/?q=node/$streamPage\"&gt;$streamName&lt;/a&gt;&lt;/div&gt;";
         echo "&lt;div style=\"padding-top: 6px; font-size: 11px;\"&gt;$streamSlogan&lt;/div&gt;";
         echo "&lt;/td&gt;";
         echo "&lt;td style=\"width: 10%; padding-left: 5px;\"&gt;&lt;br&gt;&lt;br&gt;".getLiveViews($streamID)."&lt;/td&gt;";
         echo "&lt;td style=\"width: 10%; padding-left: 5px;\"&gt;&lt;br&gt;&lt;br&gt;".getOnTime($streamID)." minutes online&lt;/td&gt;";
         echo "&lt;/tr&gt;";
    }

    function getLiveStatus($streamID)
    {
        $request =  'http://api.own3d.tv/liveCheck.php?live_id='.$streamID;
        $arg = '240';

        $session = curl_init($request.$arg);

        curl_setopt($session, CURLOPT_HEADER, false);
        curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
        $response = curl_exec($session);
        curl_close($session);

        if (preg_match("/true/",$response, $result)) 
        {
            $streamStatus="Live";
        } 
        else 
        {
          $streamStatus="Offline";
        }
        return $streamStatus;
    }

    function getLiveViews($StreamID)
    {
        $request =  'http://api.own3d.tv/liveCheck.php?live_id='.$StreamID;
        $arg = '240';

        $session = curl_init($request.$arg);

        curl_setopt($session, CURLOPT_HEADER, false);
        curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
        $response = curl_exec($session);
        curl_close($session);

        $viewStatus =value_in('liveViewers', $response) + "";

        return $viewStatus;
    }

    function getOnTime($StreamID)
    {
        $request =  'http://api.own3d.tv/liveCheck.php?live_id='.$StreamID;
        $arg = '240';

        $session = curl_init($request.$arg);

        curl_setopt($session, CURLOPT_HEADER, false);
        curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
        $response = curl_exec($session);
        curl_close($session);

        $onStatus =value_in('LiveDuration', $response) + "";

        return $onStatus;
    }
    ?&gt;
</code></pre>
