while (!feof($fp) && strlen($data) < 9000) {
                    $data .= fgets($fp, 128);
                }
                fclose($fp);
            } else {
                print "-error 1";
                // @fopen fails
            }
        }
        $ret_array = new SimpleXMLElement($data);
        return $ret_array;
    }
    // end function do_gt()
    $user = $_POST['frm_gtrack_id'];
    $url = $_POST['frm_gtrack_url'];
    $xml = do_gt($user, $url);
    $caption = $xml ? "Successful" : "Fails";
    if ($xml) {
        $api_key = get_variable('gmaps_api_key');
        // empty($_GET)
        $user_id = $xml->marker['userid'];
        $lat = $xml->marker['lat'];
        $lng = $xml->marker['lng'];
        ?>
	

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml">
  <head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
                $ret_array[0] = $id;
                $lat = $row['lat'];
                $ret_array[1] = $lat;
                $lng = $row['lng'];
                $ret_array[2] = $lng;
                $time = $row['time'];
                $ret_array[3] = $time;
            }
            // end while
        } else {
            print "-error 1";
        }
        return $ret_array;
    }
    // end function do_gt()
    $ary = do_gt($_POST['dev_key']);
    if ($ary) {
        $usr_id = $ary[0];
        $usr_lat = $ary[1];
        $usr_lng = $ary[2];
        $up_time = $ary[3];
    }
    if (!isset($usr_id)) {
        ?>
	<BR />
	<FORM NAME= 'frm_locatea' METHOD='get' ACTION = '<?php 
        print basename(__FILE__);
        ?>
'>
	<TABLE ALIGN='center'>
	<TR CLASS  = 'even'><TH COLSPAN=2>Tickets Tracker Test Fails for User: <?php