• Inviting everyone who uses WordPress management tools in Plesk
    The Plesk team is conducting a 60-minute research session that includes an interview and a moderated usability test.
    To participate, please use this link .
    Your experience will help shape product decisions and ensure the tools better support real-world use cases.

using the API by PHP

D

DaNieL..!

Guest
hi mates,

i have wrote an web applications that create dinamycally, from a php script, a database for every user who's register.

well, the problem is that those 'php generated' mysql db cant be 'seen' by plesk, so i (think) must use the api to comunicate to plesk that the db is been created (or else, create it by plesk, but always from php scripts)

in the documentation, i have found that:

<packet version="1.4.2.0">
<database>
<add-db>
<domain-id>7</domain-id>
<name>My2Base</name>
<type>postgresql</type>
<db-server-id>34</db-server-id>
</add-db>
</database>
</packet>

and i think would be my solution.

My problem atm is: how do i send the xml file to the plesk?

The documentation say so:

POST /enterprise/control/agent.php HTTP/1.1

Host: 10.58.83.1:8443

Accept: */*

HTTP_AUTH_LOGIN: admin

HTTP_AUTH_PASSWD: setup

Pragma: no-cache

Content-Length: 1398

Content-Type: text/xml

but how can i send those info by php?
and wich url should i use?
 
Back
Top