Reply to Re: [PHP] is this possible in PHP?

Your name:

Reply:


Posted by Disguised Jedi on 05/03/05 17:33

> I want a script that can display a list of all the websites currently
> hosted on my server.. (i have root access to the server)
>
> Say I have a page sitesonmyserver.php..it shud show a list of all the
> websites hosted on my server..eg:
> abc.com
> xyz.om
>
> And any additional info if possible?

I'd make a script that went through the httpd.conf file with DOM and
pulled out all the virtual hosts. Either that or looked at the home
directory listings for each site. If this is what you were getting at
(seeing as you mentioned root access and what-not), then read the next
paragraph. If not, you can skip the next paragraph.

This is quite a dangerous thing to do. Giving PHP root access to your
server is like giving a homeless guy your credit card. Anyone can
access the resources that PHP uses if they try hard enough. You might
as well just hand every hacker on the web a little Post-It note with
your root password on it.

> Is such a thing possible in PHP.. or does any such script exists?

Definitely. If you take the right approach! I'd use a database. You
could certainly find a class or script that could accomplish the
database lookup that would get what you wanted.

I'd start by reading the manual sections on mySQL database queries.

http://us4.php.net/mysql

Hope this helps!

--
The Disguised Jedi
disguised.jedi@gmail.com

Now you have my $0.02. Or .01 Pounds, .014 Euros, or $0.025 CAN. I'm
world-wide BABY!
PHP rocks!
"Knowledge is Power. Power Corrupts. Go to school, become evil"

Disclaimer: Any disclaimer attached to this message may be ignored.
However, I must say that the ENTIRE contents of this message are
subject to other's criticism, corrections, and speculations.

This message is Certified Virus Free

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация