Click to See Complete Forum and Search --> : Data Extraction


batookee
October 29th, 2004, 09:30 AM
I'm looking for a way to extract the list of VHosts from my VHost file in a PHP script.
He're is my vhost file. I want to extract vhost1.com, vhost2.com, vhost3.com ..... You get the idea. Can someone help me out with this? Thank you


$TTL 14400
@ IN SOA ns1.manacan.ca.

<bunch of text>

$ORIGIN xxx.xxx.xx.manacan.ca.
219 IN PTR vhost1.com.
218 IN PTR vhost2.com.
220 IN PTR vhost3.com.
221 IN PTR vhost4.com.
222 IN PTR vhost5.com.

blueday54555
November 15th, 2004, 06:57 AM
Don't know what you realy want but sounds
like you would need some string operators from
PHP. Have you already checked them out ?

Danii
November 15th, 2004, 07:35 AM
preg_match_all (http://se.php.net/manual/en/function.preg-match-all.php)

If you need help with the regexp syntax, tell us.