def _encode_query(item,itemtype,domain,apikey=nil)
			label = nil
			if itemtype == 'ip'
				label = item.split(/\./).reverse.join(".")
			elsif itemtype == 'domain'
				label = normalize(item)
			end
			lookup = "#{label}.#{domain}"
			if apikey
				lookup = "#{apikey}.#{lookup}"
			end
			txid = lookup.sum
			message = Resolv::DNS::Message.new(txid)
			message.rd = 1
			message.add_question(lookup,Resolv::DNS::Resource::IN::A)
			message.encode
		end
def _encode_query(item,itemtype,domain,apikey=nil)
			label = nil
			if itemtype == 'ip'
				label = item.split(/\./).reverse.join(".")
			elsif itemtype == 'domain'
				label = normalize(item)
			end
			lookup = "#{label}.#{domain}"
			if apikey
				lookup = "#{apikey}.#{lookup}"
			end
			txid = lookup.sum
			message = Resolv::DNS::Message.new(txid)
			message.rd = 1
			message.add_question(lookup,Resolv::DNS::Resource::IN::A)
			message.encode
		end
converts an ip or a hostname into the DNS query packet requires to lookup the result