<?php
	$ch = curl_init();
	curl_setopt($ch, CURLOPT_URL, "http://192.168.1.51/MingLun/action/MeterReceive.php");
	curl_setopt($ch, CURLOPT_HEADER, true);
	curl_setopt($ch, CURLOPT_POST, true);
	curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
	curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query(array("d" => "get-meter")));
	$response = curl_exec($ch);
	$header_size = curl_getinfo($ch, CURLINFO_HEADER_SIZE);
	curl_close($ch);
	
	$header = substr($response, 0, $header_size);
	$body = substr($response, $header_size);
	echo "<pre>";
	print_r($header);
	print_r($body);
?>