Hi, i tray to made a little crowler, that have to take all email addres in one website.
have found method for look at all page of site, but probably script have some problem because return a blank arrays
ther is code.
i need to take che value of href with email adddress and put in associative arrays that have for key the value of html tag that contain email link.
someone can help? thanks
have found method for look at all page of site, but probably script have some problem because return a blank arrays
ther is code.
for ($i=0; $i<4000; $i++){
$url = "http://www.viacriatusurbis.org/?page_id=188&ID=$i";
$page = file_get_contents($url);
$start = '<td class="TabellaDatiCella">';
$end = '</td>';
$data = substr($page, $start, $end);
$pattern = '<a id="TabellaDatiParrocchieRigaEmailCellalink" href="mailto:([\w\-\.]+)@((\[([0-9]{1,3}\.){3}[0-9]{1,3}\])|(([\w\-]+\.)+)([a-zA-Z]{2,4}))">';
preg_match_all($pattern, $data, $matches);
echo "<pre>";
var_dump($matches);
echo "</pre>";
/*for ($x=$inizio;$x<=$fine;$x++) {
$results[ ] = array('valore passato tra i tag del link' => 'link.');
}*/
}
i need to take che value of href with email adddress and put in associative arrays that have for key the value of html tag that contain email link.
someone can help? thanks