D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
proc
/
self
/
root
/
proc
/
self
/
root
/
opt
/
cpguard
/
app
/
scripts
/
Filename :
interworx_domain_list.php
back
Copy
#!/opt/cpguard/cpg-php-fpm/bin/php <?php ## DO NOT CUSTOMISE THIS FILE ## This file may be updated during software update ## Please make a copy of the file for customising it $json = shell_exec("/usr/bin/nodeworx -u -n -c Siteworx -a listAllDomains --output-style json"); $json = json_decode($json); $result = []; if (is_array($json)) { foreach ($json as $item) { $result[] = [ 'domain' => $item->domain, 'user' => $item->unix_user, 'docroot' => $item->domain_root ]; } } echo json_encode($result, JSON_PRETTY_PRINT);