#!/usr/bin/perl

$ct = $ENV{"CONTENT_TYPE"};
$cl = $ENV{"CONTENT_LENGTH"};

# put the data into a variable
read(STDIN, $qs, $cl);

# split it up into an array by the '&' character
@qs = split(/&/,$qs);

foreach $i (0 .. $#qs) 
  {
  # convert the plus chars to spaces
  $qs[$i] =~ s/\+/ /g;

  # convert the hex tokens to characters
  $qs[$i] =~ s/%(..)/pack("c",hex($1))/ge;

  # convert CR into <BR>
  # $qs[$i] =~ s/\n/<BR>/g;
 
  # split into name and value
  ($name[$i], $value[$i]) = split(/=/,$qs[$i],2);

}


   print "Content-type: text/html\r\n\r\n";

   print qq (
   <center>
   $value[0]
   </center>
  );



  # xpub-scan


  # system ('./BTC.sh');

