I am using PHP Simple HTML DOM Parser to fetch urls, but i got an error while fetching links. Have a look at this script:
$result = str_get_html($result);
foreach($result->find('a') as $element)
$result = str_get_html($result);
$result = str_replace('http://', '', $result);
foreach($result->find('a') as $elementa)
echo $element->href;
echo $elementa->href;
Here I want to fetch all links for twice, first time urls in $element->href
will fetch links starting with http://
and in $elementa->href
will fetch links without http://
But this shows only a blank page. Any idea?