Current time: 12-22-2024, 10:02 PM Hello There, Guest! (LoginRegister)


Post Reply 
Google-ble sitemap of your hosting clients' sites
Author Message
fred Offline
Junior Member
*

Posts: 10
Joined: Aug 2009
Reputation: 0
Post: #1
Google-ble sitemap of your hosting clients' sites
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.
08-22-2009 09:37 PM
Find all posts by this user Quote this message in a reply
Top44 Offline
Member
***

Posts: 271
Joined: Sep 2007
Reputation: 1
Post: #2
RE: Google-ble sitemap of your hosting clients' sites
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
(This post was last modified: 01-25-2010 08:50 PM by Top44.)
01-22-2010 06:35 AM
Find all posts by this user Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)