first draft of measure.php and edits to pmeasure.js rendering it unusable temporarily.