diff --git a/data/%%AD^AD7^AD71B708%%rss.tpl.php b/data/%%AD^AD7^AD71B708%%rss.tpl.php index 64e3b8b..cbc4b85 100644 --- a/data/%%AD^AD7^AD71B708%%rss.tpl.php +++ b/data/%%AD^AD7^AD71B708%%rss.tpl.php @@ -1,4 +1,4 @@ - version="1.0" encoding="UTF-8"'; ?> diff --git a/data/%%F7^F7F^F7F34188%%header.tpl.php b/data/%%F7^F7F^F7F34188%%header.tpl.php index b6bd88e..fb3edab 100644 --- a/data/%%F7^F7F^F7F34188%%header.tpl.php +++ b/data/%%F7^F7F^F7F34188%%header.tpl.php @@ -1,4 +1,4 @@ - diff --git a/docs/api.php b/docs/api.php index 0205224..76b10fa 100644 --- a/docs/api.php +++ b/docs/api.php @@ -33,14 +33,17 @@ class api { switch ($call) { case "postcode": - if(!isset($_GET['postcode']) || !is_postcode($_GET['area_size'])){ + + if(!isset($_GET['area_size']) || !is_postcode($_GET['postcode'])){ array_push($this->warnings, "No valid postcode specified"); } if(!isset($_GET['area_size'])){ array_push($this->warnings, "Area size specified"); } + //all good, get the data if(sizeof($this->warnings) == 0){ + $xy = postcode_to_location($_GET['postcode']); $easting = $xy[0]; $northing = $xy[1];