<?php
$ip=$_GET["ip"];
$ch = curl_init("http://$ip/HomePage.asp");
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 1);
$remote=curl_exec ($ch);
curl_close($ch);
if ($remote!=false)
	{
	$t1=@explode("id=\"MACAddress1Value\" value=\"", $remote);
	$t2=@explode("\"", $t1[1]);
	$mac=$t2[0];
	if (substr($mac, 0, 9)=="00:12:BD:")
		{
		echo("ok=$mac");
		}
	else echo("no");
	}
else echo("no");
?>