Question : PHP Simple HTML DOM Parser with parse_url

hello expert phpers!

am using the parser from http://simplehtmldom.sourceforge.net/
just the basic strip page and get URLs function
it strips quite well, but also gives bad non-valid URLs in the process

ie: using it with variable "http://www.google.com.au", give back stuff like "/intl/en/ads/" or "/intl/en/about.html"

am trying to join this with the parse_url function but have no idea to get it working
probably goin the wrong way bout it =)

the end goal is to return a list of only valid URLs or even better just the domain names (without http://)

am flexible with approach if parse_url is not ideal way to go
preference would be to just capture all between the http:// and first slash, like what might be in the xxx's only, eg: http://xxx.xxx.xxx/index.php or http://xxx.xxx/index.php etc

cheers
1:
2:
3:
4:
foreach($html->find('a') as $element)
	$element->href = parse_url($element->href, PHP_URL_HOST);
	echo $element->href . '<br>';
?>

Answer : PHP Simple HTML DOM Parser with parse_url

The only thing is that the passwords are stored in clear text in that file.

But if you're cool with that then that'll do it.

Good Luck,
- gurutc
Random Solutions  
 
programming4us programming4us