View Single Post
Old 09-07-2004, 05:28 AM   #4
ISPsystem team
 
Join Date: Mar 2004
Posts: 98
Igor has disabled reputation
Default

you can use API for add xxxxxxxx.site.com alias to all your sites

example perl script for this task:
==============================================
#!/usr/bin/perl

@SITES = `fetch -qo - "http://localhost/manager/ispmgr?out=text&func=site"`;

foreach (@SITES) {
chomp;
$name = (split(/\s/))[0];
$site = (split(/=/, $name))[1];
print "$site\n";
$info = "";
@PROP = `fetch -qo - "http://localhost/manager/ispmgr?out=text&func=site.edit&elid=$site"`;
foreach(@PROP) {
chomp;
if (/alias=/) {
$_ .= " xxxxxxxx.$site";
}
$info .= "&$_";
}
system("fetch -qo - \"http://localhost/manager/ispmgr?out=text&func=site.edit&sok=yes$info\"");
}
__________________
ISPsystem support team
Igor is offline   Reply With Quote