• Plesk Uservoice will be deprecated by October. Moving forward, all product feature requests and improvement suggestions will be managed through our new platform Plesk Productboard.
    To continue sharing your ideas and feedback, please visit features.plesk.com

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