HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Developers' Forum (http://www.howtoforge.com/forums/forumdisplay.php?f=33)
-   -   List all websites via ISPConfig remote API (http://www.howtoforge.com/forums/showthread.php?t=56988)

todx 19th April 2012 12:26

List all websites via ISPConfig remote API
 
I'm assuming that when I access sites web_domain_list.php is executed?

How can I use that from ISPConfig remote API?

Anyway I'd like to list all website domain using ISPConfig remote API...

till 19th April 2012 12:40

Please see remote API documnetation for a list of api functions, you find that in the remote_client/ API-docs/ folder of the ISPConfig tar.gz. All functions are described there incl. script examples.

todx 19th April 2012 12:47

I've found the example, but that only allows retrieving one website at a time by providing the id

todx 19th April 2012 13:18

Found a simple solution: =)

PHP Code:

$c=1;
while(
$domain_record $client->sites_web_domain_get($session_id$c)) {
     
var_dump($domain_record);
     
$c++;



david_hitt@lionlike.com 9th April 2014 01:54

Kinda late... but...
 
Till showed me this one:

Code:

$domain_record = $client->sites_web_domain_get($session_id, array('system_group' => 'client'.$client_id));
foreach ($domain_record as $domains) {
  echo $domains['domain']."<br>";
}

You can use "array('system_group' => 'client'.$client_id)" in place of $primary_id so it'll search the table field specified and match criteria.

I just so happen to store the client_id in the interfacing system so I pull client_id from my local database, concat with 'client' and search the web_domains using 'system_group' which equals clientX.


All times are GMT +2. The time now is 02:34.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.