nz postcode finder

346 views
Skip to first unread message

Zhen Sun

unread,
Jan 17, 2008, 9:49:30 PM1/17/08
to ph...@phpug.org.nz
Hi there,

I'm trying to find a way to post the query/form to nz post postcode finder then fetch the result.

Does any one have the idea how to do it or have done it?

--
Kindest Regards,

Zhen Sun

Nick

unread,
Jan 17, 2008, 9:53:58 PM1/17/08
to nzp...@googlegroups.com
http://www.noodles.net.nz/2007/09/14/new-zealand-postcode-database-v2/

> ------------------------------------------------------------------------
>
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.5.516 / Virus Database: 269.19.6/1230 - Release Date: 17/01/2008 4:59 p.m.
>

Zhen Sun

unread,
Jan 17, 2008, 10:11:16 PM1/17/08
to nzp...@googlegroups.com
well, i know that db, but i'm looking for a different solution. post the data to the finder then get the content of the result page.

thx anyway.

Cameron Junge

unread,
Jan 17, 2008, 10:13:16 PM1/17/08
to nzp...@googlegroups.com

cURL + screen scraping

 

Be the only reasonable way I’d say.

 

Cameron

 


From: nzp...@googlegroups.com [mailto:nzp...@googlegroups.com] On Behalf Of Zhen Sun
Sent: Friday, 18 January 2008 4:11 p.m.
To: nzp...@googlegroups.com
Subject: [phpug] Re: nz postcode finder

Zhen Sun

unread,
Jan 17, 2008, 10:22:06 PM1/17/08
to nzp...@googlegroups.com
yer, true. but the server doesn't have cUrl. is there any alternative?

anru chen

unread,
Jan 17, 2008, 10:37:27 PM1/17/08
to nzp...@googlegroups.com
file_get_contents? or socket programming?

Olwen Williams

unread,
Jan 17, 2008, 11:39:04 PM1/17/08
to nzp...@googlegroups.com
You might be able to use the google maps api (but it may not fit their
terms of service)

Cameron Junge wrote:
>
> cURL + screen scraping
>
> Be the only reasonable way I’d say.
>
> Cameron
>
> ------------------------------------------------------------------------
>
> *From:* nzp...@googlegroups.com [mailto:nzp...@googlegroups.com] *On
> Behalf Of *Zhen Sun
> *Sent:* Friday, 18 January 2008 4:11 p.m.
> *To:* nzp...@googlegroups.com
> *Subject:* [phpug] Re: nz postcode finder

Chris Burgess

unread,
Jan 18, 2008, 12:11:31 AM1/18/08
to nzp...@googlegroups.com
NZ Post's Postcode finder could do with a hand - eg a search for "Seaview Road, Piha" produces a postcode of 0200 (that would be Paihia, Bay of Islands). The same search details work on all the overseas mapping sites I've tried.

Searches on NZ Post with 'Town/City' set to "Waitakere", "Henderson", "Auckland" all produce no results. The correct answer is (obviously) New Lynn.

If you're going to set about screenscraping NZ Post's world view, be prepared for it to produce some unexpected results when people enter an address they think they live at. Cross-referencing lookups with mapping API might help to highlight some of their more outlandish claims.

Google Maps does return postal codes with the address results, so it might be worth comparing.

Zhen Sun

unread,
Jan 18, 2008, 7:09:24 PM1/18/08
to nzp...@googlegroups.com
cheers man, seems google map could help.

Sarah King

unread,
May 10, 2013, 5:16:55 AM5/10/13
to nzp...@googlegroups.com
Nothing like bumping an ancient thread but has anyone written anything to query the NZPost site? Curl or anything simila? 

I gather they're considering building an API but nobody has returned my calls so I have no idea if it's imminent (so hang fire) or shelved (so build something).

thanks

Sarah




Sarah King
Tel: 09 815 8642 | Mobile: 0273 711 298
http://www.itamer.com
http://www.roommatecabins.co.nz
Twitter LinkedIn
Contact me: Google Talk rainchx Skype sarah.king

 

Bruce Clement

unread,
May 10, 2013, 7:54:05 AM5/10/13
to nzp...@googlegroups.com
Interesting question, I've been pondering the possibility of an open postcode directory recently.

I'm not keen on screenscraping as a data source myself. The data isn't really Free (Libre) and more pragmatically there's too much chance of lawsuits and minor formatting changes breaking things.

With a bit of publicity and careful explanation of the project's aim it should be possible to get people to "donate" address / post-code pairings to an open database.

The founder of OpenStreetMap has started a sister project called Free The Postcode http://www.freethepostcode.org/ which is working on developing a list for the UK. Who knows, a polite request might obtain their software to ease starting a project for NZ.

OpenStreetMap itself is interested in postcodes, but the NZ page http://wiki.openstreetmap.org/wiki/New_Zealand_sub-projects lists postcodes as still to do - there may be some partial data there.



--
--
NZ PHP Users Group: http://groups.google.com/group/nzphpug
To post, send email to nzp...@googlegroups.com
To unsubscribe, send email to
nzphpug+u...@googlegroups.com
---
You received this message because you are subscribed to the Google Groups "NZ PHP Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nzphpug+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Bruce Clement

Home:    http://www.clement.co.nz/
Twitter:    http://twitter.com/Bruce_Clement

"Before attempting to create something new, it is vital to have a good
appreciation of everything that already exists in this field." Mikhail
Kalashnikov

Jeremy @ Last Season

unread,
May 11, 2013, 2:42:16 AM5/11/13
to nzp...@googlegroups.com
Hey guys,

At www.lastseason.co.nz we use http://addressfinder.co.nz/ It works really well for us and is free if you don't do more than 1,000 lookups per month.

Kind Regards,

 

Jeremy

jeremy@lastseason·co·nz
lastseason·co·nz    p 0800 LASTSEASON    m 021 472 349    skype jeremymould
Last Seasons Top Brands - On Sale - ALWAYS

Sarah King

unread,
May 11, 2013, 3:55:39 AM5/11/13
to nzp...@googlegroups.com
Thanks, I'll look into that one.

I did laugh at the idea that NZ Post might be precious about sharing their database given that they return mail that doesn't have a postcode on it. I get that they probably want the traffic but repeat visits from a small group of people doesn't really increase their revenue making opportunities.

Sarah

--
--
NZ PHP Users Group: http://groups.google.com/group/nzphpug
To post, send email to nzp...@googlegroups.com
To unsubscribe, send email to
nzphpug+u...@googlegroups.com
---
You received this message because you are subscribed to the Google Groups "NZ PHP Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nzphpug+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 


--


Chris Morris

unread,
May 11, 2013, 4:11:45 AM5/11/13
to nzp...@googlegroups.com
I work for NZ Post ( as a postie ) - and no we do not return mail that does not have a postcode. In fact 90% of the mail that comes through my morning sort does not have postcode on it.  It gets delivered just the same :)

chris

Sam Bonner

unread,
May 10, 2013, 5:33:45 AM5/10/13
to nzp...@googlegroups.com
NZ Post already provides a bunch of well documented API's for various services - http://api.nzpost.co.nz/common - would one of those not suit your purposes?

Thanks,
Sam


Jonathan Hunt

unread,
May 14, 2013, 8:18:17 PM5/14/13
to nzp...@googlegroups.com
On 10/05/2013, at 9:33 PM, Sam Bonner wrote:
> NZ Post already provides a bunch of well documented API's for various services - http://api.nzpost.co.nz/common - would one of those not suit your purposes?

Those APIs are limited to very specific use cases. None return a postcode or validate an address.

> On 10 May 2013 21:16, Sarah King <sa...@pcpropertymanager.com> wrote:
> Nothing like bumping an ancient thread but has anyone written anything to query the NZPost site? Curl or anything simila?
>
> I gather they're considering building an API but nobody has returned my calls so I have no idea if it's imminent (so hang fire) or shelved (so build something).

NZPost have an API at http://address.nzpost.co.nz/ that is very similar the AddressFinder API (similar underlying tech AFAICT) but they haven't made it public and I've had no response regarding when it will be made public.

Geonames have Postcode to Town and Lat/Lon mapping licensed as CC-BY.
http://www.geonames.org/postalcode-search.html?q=8140&country=NZ
also available as a download http://download.geonames.org/export/zip/NZ.zip
I'm not sure how up-to-date it is.

It would be interesting to do a comparison with the official postcode data.

Regards
Jonathan

Sarah King

unread,
May 14, 2013, 10:34:49 PM5/14/13
to nzp...@googlegroups.com
Thanks for the replies! 

  • Chris - nice to know that the hoopla about returned mail must relate to isolated incidents and not normal practice
  • Jeremy - Address Finder looked really good but this app is for an "intranet", the form won't be public facing at any rate, and $1500 is a pretty steep fee.
I like the look of the address.nzpost.co.nz stuff so I've tweeted them since online chat, phone calls and requests for info haven't worked. I'm astounded that this isn't more of an issue and that they haven't sorted this out long ago.

Sarah




Sarah King
Tel: 09 815 8642 | Mobile: 0273 711 298
http://www.itamer.com
http://www.roommatecabins.co.nz
Twitter LinkedIn
Contact me: Google Talk rainchx Skype sarah.king

 


Sarah King

unread,
May 14, 2013, 10:34:48 PM5/14/13
to nzp...@googlegroups.com
Thanks for the replies! 

  • Chris - nice to know that the hoopla about returned mail must relate to isolated incidents and not normal practice
  • Jeremy - Address Finder looked really good but this app is for an "intranet", the form won't be public facing at any rate, and $1500 is a pretty steep fee.
I like the look of the address.nzpost.co.nz stuff so I've tweeted them since online chat, phone calls and requests for info haven't worked. I'm astounded that this isn't more of an issue and that they haven't sorted this out long ago.

Sarah




Sarah King
Tel: 09 815 8642 | Mobile: 0273 711 298
http://www.itamer.com
http://www.roommatecabins.co.nz
Twitter LinkedIn
Contact me: Google Talk rainchx Skype sarah.king

 


On Wed, May 15, 2013 at 12:18 PM, Jonathan Hunt <ph...@huntdesign.co.nz> wrote:

Sarah King

unread,
May 19, 2013, 11:52:32 PM5/19/13
to nzp...@googlegroups.com
Thanks, I'll look into that one.

I did laugh at the idea that NZ Post might be precious about sharing their database given that they return mail that doesn't have a postcode on it. I get that they probably want the traffic but repeat visits from a small group of people doesn't really increase their revenue making opportunities.

Sarah



On Saturday, May 11, 2013, Jeremy @ Last Season wrote:
--
--
NZ PHP Users Group: http://groups.google.com/group/nzphpug
To post, send email to nzp...@googlegroups.com
To unsubscribe, send email to
nzphpug+u...@googlegroups.com
---
You received this message because you are subscribed to the Google Groups "NZ PHP Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nzphpug+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 


--


Jeremy Mould

unread,
Aug 6, 2013, 7:11:26 PM8/6/13
to nzp...@googlegroups.com
Hey guys,

Our company Last Season is looking for a Magento developer part time at this stage, but definately potential to become more permanant after christmas.

We have been going for 18 Months now and is really thriving (Check our Facebook).  We currently employ someone in India full time to help with development tasks but looking to get someone local instead.  I have a BCMS and have been in the industry as a developer for 15 years, so have the skills but not the time to complete all the tasks.  

Send me an email if it is something that could interest you.

Cheers,

Jeremy
Reply all
Reply to author
Forward
0 new messages