• Introducing WebPros Cloud - a fully managed infrastructure platform purpose-built to simplify the deployment of WebPros products !  WebPros Cloud enables you to easily deliver WebPros solutions — without the complexity of managing the infrastructure.
    Join the pilot program today!
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.

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