anchor.diff:      {200, Json}.
   
   invalid_ip() ->
  -    {400, "{\"message\":\"invalid ip.\"}"}.
  +    {400, "{\"message\":\"Invalid IP\"}"}.
   
   months() ->
       ["Jan", "Feb", "Mar", "Apr", "May", "Jun",
  
positive.code:             end;
          _ -> error
      end.
  
  geoman() ->
      ok.
  
negative.code:         _ -> invalid_ip()
      end.
  
  %% mt_ips value format:
  %%     2 |  10 |       8 |       12 |   16 |     16 |    256
  %% ------+-----+---------+----------+------+--------+--------
  %%  flag | ISP | country | province | city | county | bitmap
  lookup_ets(IP) ->
      {A, B, C, D} = inet:parse_ipv4_address(IP),
      Key = (A bsl 16) + (B bsl 8) + C,
      case ets:lookup(?IPS_TABLE, Key) of
          [{Key, Value}] ->
              L = 255 - D,
              <<Flag:2, ISP:10, Country:8, Province:12, City:16,
                County:16, _:L, X:1, _:D>> = Value,
              case X of
                  1 ->
                      Geo = id_to_name(ISP, Country, Province, City, County),
                      {200, format([IP | Geo])};
                  0 -> ok
              end;
          [] ->
              case taobao_api(IP) of
                  ok -> lookup_ets(IP);
                  error -> invalid_ip()
              end
      end.
  
  id_to_name(ISP_id, Country_id, Province_id, City_id, County_id) ->
      [{_, ISP}]      = ets:lookup(?GEO_TABLE, {isp,      ISP_id}),
      [{_, Country}]  = ets:lookup(?GEO_TABLE, {country,  Country_id}),
      [{_, Province}] = ets:lookup(?GEO_TABLE, {province, Province_id}),
      [{_, City}]     = ets:lookup(?GEO_TABLE, {city,     City_id}),
      [{_, County}]   = ets:lookup(?GEO_TABLE, {county,   County_id}),
      [ISP, Country, Province, City, County].
  
  format(Args) when is_list(Args) ->
      % [IP, ISP, Country, Province, City, County] = Args
      io_lib:format(normal_ip(), Args).
  
  normal_ip() ->
      "{\"ip\":\"~s\", \"isp\":\"~s\", \"country\":\"~s\"," ++
      "\"province\":\"~s\", \"city\":\"~s\", \"county\":\"~s\"}".
  
  special_ip(IP) ->
      Json = "{\"province\":\"https://www.iana.org/assignments/iana-ipv4-special-registry/iana-ipv4-special-registry.xhtml\"," ++
  