Hi, i have php xml parser. I have create a ticker with the data from xml and works gr8. What i need now is how can i update the data (xml is from external url and updatable)
the the code that i use is
PHP Code:
<?php
$html = "";
$url= "http://www.somesite.com/ticker/ticker.xml";
$xml = simplexml_load_file($url);
$xml = simplexml_load_file($url);
?>
<div align="center">
<marquee scrollamount="4" height="30" width="920" style="background-image : URL(/stockmarketticker_back.png) ;
background-attachment : fixed ;color : #663333 ;padding-top :3">
<strong>
<?php
foreach($xml->m as $stock)
{
$StockSymbol = $stock->attributes()->s.' : ';
$StockPrice = $stock->attributes()->l.' ◎ ';
$StockMetavli = $stock->attributes()->c.' ◎ ';
$StockMetavli1 = $stock->attributes()->p.'%◎ ';
$color = "white";
if ($StockMetavli1 < 0) $color = '#E80000 ';
elseif ($StockMetavli1 > 0) $color = '#33FF66';
echo "<font color=white font face='arial' size='3pt'>$StockSymbol</font>";
echo "<font color=$color font face='arial' size='3pt'>$StockPrice</font>";
echo "<font color=$color font face='arial' size='3pt'>$StockMetavli</font>";
echo "<font color=$color font face='arial' size='3pt'>$StockMetavli1</font>";
}
?>
</strong>
</marquee>
</div>
i want to update data from xml without refreshing the page...
thanks
Bookmarks