Api editing site information
Posted: Thu Sep 02, 2010 8:37 am
Hi
Is it possible to have an API for editing text site news ?
Is it possible to have an API for editing text site news ?
See the SystemGet and SystemSet commands in the docs. Those apply to every setting on the System tab.coyote wrote:Hi
Is it possible to have an API for editing text site news ?
Code: Select all
<?php
// Connexion au serveur de jeu
include "API.php"; // $pw and $url set in this file
$params = "Password=" . $pw . "&Command=SystemGet&Property=SiteNews";
$api = Poker_API($url,$params,true);
$result = $api["Result"];
if ($result == "Error") die("Error: " . $api["Error"]);
$sitenews = $api["Value"];
?>
The carriage return/line feeds in the Site News are messing up the associated array in $api[]. The easiest workaround is to replace them with html break tags. So instead of this:coyote wrote:If I use this function I have only the first line of text