Site News
Posted: Wed Dec 29, 2010 1:01 pm
Hello i want to add the site news on the software to a webpage.. how can i do that ? thank you
Any of the System property values can be retrieved via the SystemGet API command. In the case of the Site News text, set the Property parameter to "SiteNews".mike123 wrote:Hello i want to add the site news on the software to a webpage.. how can i do that ? thank you
Code: Select all
<html>
<body>
<?php
include "API.php"; // $pw and $url set in this file
$params = "Password=" . $pw . "&Command=SystemGet&Property=SiteNews";
// call with third parameter = false to get result as an ordinary array
$api = Poker_API($url,$params,false);
// quit if error found
if ($api[0] == "Result=Error") die($api[1]);
// trim "Value=" from beginning of first line
$news = substr($api[1],6);
// append remaining lines together with break tag in between
for ($i=2; $i<count($api); $i++) $news = $news . "<br/>" . $api[$i];
// display it
echo $news;
?>
</body>
</html>