Welcome Guest. Please Login or Register  


You are here: Index > Softaculous Auto Installer > General Support > Topic : NOC API



Threaded Mode | Print  

 NOC API, always print data (2 Replies, Read 2291 times)
zuperhost
Group: NOC
Post Group: Newbie
Posts: 2
Status:
Hi,

I trying to configure my own licenses API.

the code: $noc->r($noc->licenses()); allways print data.

Code Example:

<?php
global $usuario;
global $password;
include_once 'noc_api.php';
$noc = new SOFT_NOC("$usuario", "$password");
$data = $noc->r($noc->licenses());

print "Now print_r";
print_r($data);
?>

Any example of how print data as XML will be great.

Thanks you.
IP: --   

NOC API
Brijesh
Group: Softaculous Team
Post Group: Super Member
Posts: 5653
Status:
Hi,

We have added this to our NOC API.
Just download the new noc_api file here :
http://www.softaculous.com/noc?ca=download_api

You can use it like this :
PHP Code

<?php
global $usuario;
global 
$password;
include_once 
'noc_api.php';
$noc = new SOFT_NOC("$usuario""$password");
$data $noc->licenses();

print 
"Now print data in XML";
echo 
ArrayToXML::toXML($data);

print 
"Now print data in JSON";
echo 
array2json($data);
?>



Edited by Brijesh : October 19, 2012, 1:58 pm

-----------------------
Webuzo - Multi User Hosting Control Panel
AMPPS - Best WordPress/PHP/MySQL development tool
IP: --   

NOC API
zuperhost
Group: NOC
Post Group: Newbie
Posts: 2
Status:
Hi,

I was create manually the xml from the array.

Thanks for the code.


IP: --   

« Previous    Next »

Threaded Mode | Print  



Jump To :


Users viewing this topic
1 guests, 0 users.


All times are GMT. The time now is May 10, 2024, 7:11 pm.

  Powered By AEF 1.0.8 © 2007-2008 Electron Inc.Queries: 10  |  Page Created In:0.025