-
Notifications
You must be signed in to change notification settings - Fork 0
/
newryScrape.php
18 lines (14 loc) · 1.07 KB
/
newryScrape.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<?php
$count = 0;
$w = array("Crotlieve","Crotlieve","Crotlieve","Crotlieve","Crotlieve","Crotlieve","Downpatrick","Downpatrick","Downpatrick","Downpatrick","Downpatrick","Newry","Newry","Newry","Newry","Newry","Newry","Rowallane","Rowallane","Rowallane","Rowallane","Rowallane","Slieve Croob","Slieve Croob","Slieve Croob","Slieve Croob","Slieve Croob","Slieve Gullion","Slieve Gullion","Slieve Gullion","Slieve Gullion","Slieve Gullion","Slieve Gullion","Slieve Gullion","The Mournes","The Mournes","The Mournes","The Mournes","The Mournes","The Mournes","The Mournes");
$monster[1010][0] = '//div[@class="lmt_content"]/span';
$monster[1010][1] = '//div[@class="lmt_content"]/strong[1]/following-sibling::text()[1]';
$name = $xpath->query($monster[$councilNumber][0]);
$party = $xpath->query($monster[$councilNumber][1]);
foreach($name as $item) {
$n[] = str_replace(" ", "", htmlentities(addslashes(trim($item->nodeValue)), null, 'utf-8'));
}
foreach($party as $item) {
$p[] = str_replace(" ", "", htmlentities(addslashes(trim($item->nodeValue)), null, 'utf-8'));
}
?>