How to measure handlebar diameter?
Is it a road dropbar or a MTB riser style bar? These two images should prove useful. If it is a mountain bike style riser or straight bar it's quite simple.

If it's a road bar most people (zipp) measure center to center of the drops. 







Also if it is a Mountain bike were speaking of, most bars will be sold as 730mm or more wide and have pre-printed lines to cut them shorter. There is a lot of preference involved in bar length. I prefer a shorter length than a lot of people my size, some downhill guys prefer 800mm bars, too long for me, I'm good at finding trees! :P

A good reference if its a road bar is about shoulder width in the drops. This can vary with preference and riding style slightly but is a solid method for the best on bike ergonomics and comfort.