Your session id is apparently being stored in a cookie, but your code does nothing to receive or pass back the cookie. Do this using CURLOPT_COOKIEJAR and CURLOPT_COOKIEFILE, something like this:
$curl = curl_init();
curl_setopt ($curl, CURLOPT_URL, "http://support.ngsnet.net/realms.aspx?__EVENTTARGET=DataGrid1:_ctl9:_ctl0");
curl_setopt($curl, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)");
curl_setopt($curl, CURLOPT_HEADER, 1);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_COOKIEJAR, '/path/to/cookiefile');
ob_start();
curl_exec ($curl);
ob_end_clean();
unset($curl);
$curl = curl_init();
curl_setopt ($curl, CURLOPT_URL, "http://support.ngsnet.net/user_sessions.aspx");
curl_setopt($curl, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)");
curl_setopt($curl, CURLOPT_HEADER, 1);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_COOKIEJAR, '/path/to/cookiefile');
curl_setopt($curl, CURLOPT_COOKIEFILE, '/path/to/cookiefile');
ob_start();
curl_exec ($curl);
ob_end_clean();
unset($curl);
$curl = curl_init();
curl_setopt ($curl, CURLOPT_URL, "http://support.ngsnet.net/user_sessions.aspx?__EVENTTARGET=btnOK&__EVENTARGUMENT=&__VIEWSTATE=dDwtNjQ5NjgwNTI1Ozs%2Bc4SsOmVzdHA4377ABboPdElmM%2FU%3D&txtUName=m5&startdate=84%2F07%2F01&enddate=86%2F06%2F31");
curl_setopt($curl, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)");
curl_setopt($curl, CURLOPT_HEADER, 1);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_COOKIEJAR, '/path/to/cookiefile');
curl_setopt($curl, CURLOPT_COOKIEFILE, '/path/to/cookiefile');
ob_start();
curl_exec ($curl);
ob_end_clean();
unset($curl);
$curl = curl_init();
curl_setopt ($curl, CURLOPT_URL, "http://support.ngsnet.net/sessions.aspx");
curl_setopt($curl, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)");
curl_setopt($curl, CURLOPT_HEADER, 1);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_COOKIEJAR, '/path/to/cookiefile');
curl_setopt($curl, CURLOPT_COOKIEFILE, '/path/to/cookiefile');
ob_start();
$mswdata= curl_exec ($curl);
ob_end_clean();
unset($curl);
echo $mswdata;
(Untested, of course.)
See another example here.
Edit: I think this will work better:
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, "http://support.ngsnet.net/realms.aspx?__EVENTTARGET=DataGrid1:_ctl9:_ctl0");
curl_setopt($curl, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)");
curl_setopt($curl, CURLOPT_HEADER, 1);
curl_setopt($curl, CURLOPT_COOKIEJAR, '/path/to/cookiefile');
curl_setopt($curl, CURLOPT_COOKIEFILE, '/path/to/cookiefile');
curl_exec($curl);
curl_setopt($curl, CURLOPT_URL, "http://support.ngsnet.net/user_sessions.aspx");
curl_exec($curl);
curl_setopt($curl, CURLOPT_URL, "http://support.ngsnet.net/user_sessions.aspx?__EVENTTARGET=btnOK&__EVENTARGUMENT=&__VIEWSTATE=dDwtNjQ5NjgwNTI1Ozs%2Bc4SsOmVzdHA4377ABboPdElmM%2FU%3D&txtUName=m5&startdate=84%2F07%2F01&enddate=86%2F06%2F31");
curl_exec($curl);
curl_setopt($curl, CURLOPT_URL, "http://support.ngsnet.net/sessions.aspx");
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
$mswdata = curl_exec($curl);
echo $mswdata;