#!/usr/bin/perl

print "Content-type: text/html\n\n";
print "loading...<br>\n";
##sleep(3);
$DONE=(1==2);
`wget -q -O hex http://www.hq.nasa.gov/osf/station/viewing/p.html`;
print "returned from call<br>\n";
open(IN,"cat hex | grep -A100 Poughkeepsie|");
do {
 $line=<IN>;
 $line=~s/\n//;
 ($data,$command)=split(/</,$line);
  $command=~s/>//g;
  $command=uc($command);
 if ($command eq "TD")
        {##print "new colum\n";
         $x=0; }
 if ($command eq "BR") 
        {$x++;
         $ROW[$x]=$ROW[$x]." ".$data;
         }
  ($t1,$t2)=split(/ /,$command);
  if ($t1 eq "TR") {$DONE=(1==1);}


  } until ((eof(IN))||$DONE);
print"Date Time from/to lenght max altitude<br>\n";
for ($n=1;$n<=@ROW;$n++)
   {  print "$ROW[$n]<br>\n";   
        }
print q! I'm getting this data from 
<a href=http://www.hq.nasa.gov/osf/station/viewing/p.html>NASA</a> I'm not 
clamiming that's my data, nor anything like that. I just reformatted it 
so that I could cut and paste the text. ( formating on the NASA site 
dosn't work well for copying).
!;
