J
jefwic
Guest
Hi everyone,
I am trying to integration the Plesk API (which uses XML) with some of my PHP scripts. I haven't worked much with XML, however have read through the tutorials on w3schools.com and am still a little stumped. It would be greatly appreciated if someone could help me with this.
Plesk API Documentation lists the schemas that Plesks uses, and I believe this shows how to use the right commands (is this correct?).
I am trying to use this code:
(the $data is part of the PHP submitting)
and the returned XML is
(which is the same as if no specific commands are sent)
gets
I think I'm just a little off in my coding. What I am trying to get is the permissions for a client named "Hosting". If someone knows what I am doing wrong / how to fix it / or where I can learn to do it right it would be great.
Thanks,
Jeff
I am trying to integration the Plesk API (which uses XML) with some of my PHP scripts. I haven't worked much with XML, however have read through the tutorials on w3schools.com and am still a little stumped. It would be greatly appreciated if someone could help me with this.
Plesk API Documentation lists the schemas that Plesks uses, and I believe this shows how to use the right commands (is this correct?).
I am trying to use this code:
Code:
$data =<<<EOF
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<packet version="$proto">
<server>
<get>
<permissions/>
</get>
</server>
</packet>
EOF;
and the returned XML is
Code:
<?xml version="1.0" encoding="UTF-8"?>
<packet version="1.3.1.0">
<server>
<get>
<result>
<status>ok</status>
</result>
</get>
</server>
</packet>
Code:
$data =<<<EOF
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<packet version="$proto">
<server>
<get>
<gen_info/>
</get>
</server>
</packet>
EOF;
Code:
<?xml version="1.0" encoding="UTF-8" ?>
- <packet version="1.3.1.0">
- <server>
- <get>
- <result>
<status>ok</status>
- <gen_info>
<server_name>TechServer.prod.phx1.secureserver.net</server_name>
</gen_info>
</result>
</get>
</server>
</packet>
I think I'm just a little off in my coding. What I am trying to get is the permissions for a client named "Hosting". If someone knows what I am doing wrong / how to fix it / or where I can learn to do it right it would be great.
Thanks,
Jeff