- <?php
- if ($handle) {
- $url = "http://www.dslchecker.bt.com/pls/adsl/ADSLChecker.AddressOutput?URL=&SP_NAME=a%20service%20provider&postcode=$postcode&VERSION=29&MS=E&CAP=yes&AEA=N";
- $dom = new DOMDocument();
- @$dom->loadHTML($result);
- $finder = new DomXPath($dom);
- $nodes = $finder->query("//option");
- foreach ($nodes as $node) {
- if ($node->nodeValue == "Please select your address from the list below.") continue;
- $firstline = $address[0];
- "number" => $number[0],
- "postcode" => $postcode,
- );
- } else {
- "name" => $firstline,
- "number" => $number[0],
- "postcode" => $postcode,
- );
- }
- }
- }
- }
- foreach ($addresses as $address) {
- $number = $address["number"];
- $name = $address["name"];
- $postcode = $address["postcode"];
- echo "$postcode\r\n";
- $url = "http://www.dslchecker.bt.com/pls/adsl/ADSLChecker.AddressOutput?URL=&SP_NAME=a%20service%20provider&postcode=$postcode&buildingnumber=$number&buildingname=$name&VERSION=29&MS=E&CAP=yes&AEA=N";
- $cabinet = $matches[1];
- echo "$name, $number, $postcode. Cabinet: ".($cabinet ? $cabinet : "EO")."\r\n";
- }
- ?>
Untitled
Posted by Anonymous on Sun 13th Apr 2014 06:35
raw | new post
modification of post by Anonymous (view diff)
Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.
kpaste.net RSS