• The APS Catalog has been deprecated and removed from all Plesk Obsidian versions.
    Applications already installed from the APS Catalog will continue working. However, Plesk will no longer provide support for APS applications.
  • Please be aware: with the Plesk Obsidian 18.0.78 release, the support for the ngx_pagespeed.so module will be deprecated and removed from the sw-nginx package.

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