ispCP - Board - Support
Google-ble sitemap of your hosting clients' sites - Printable Version

+- ispCP - Board - Support (http://www.isp-control.net/forum)
+-- Forum: ispCP Omega Contributions Area (/forum-40.html)
+--- Forum: Snippets (/forum-42.html)
+--- Thread: Google-ble sitemap of your hosting clients' sites (/thread-7577.html)



Google-ble sitemap of your hosting clients' sites - fred - 08-22-2009 09:37 PM

Code:
#!/usr/bin/perl

@dirs = `find /var/www/virtual|grep viralhosts.com\$`;
open(F, ">/var/www/ispcp/gui/sites.html");
print F "<html><body>";
foreach(@dirs) {
chomp;
/.*\/(.*)$/;
print F "<a href='http://$1'>$1</a><br>";
}
print F "</body></html";
close F;

http://yourhost.com/sites.html shows all your client sites.


RE: Google-ble sitemap of your hosting clients' sites - Top44 - 01-22-2010 06:35 AM

Hi,

did not work, recoded it to :


Code:
#!/usr/bin/perl

@dirs = `ls /var/www/virtual`;
open(F, ">/var/www/ispcp/gui/sites.html");
print F "<html>\n<body>";
foreach(@dirs) {
chomp;
/.*\/(.*)$/;
print F "<a href='http://$_'>$_</a><br>\n";
}
print F "</body>\n</html>";
close F;


greets