Question
· Jun 15, 2021

Getting Users ip and location

 My requirement is to get the website visitors IP address and location. I tried an external API . Always it's returning server IP and location not visitors IP.  

set req=##class(%Net.HttpRequest).%New()
  set req.Server="api.ipstack.com"
  set req.ContentType="application/json"                                           
  set sc=req.Get("/check?access_key= key here")
  set data=req.HttpResponse.Data
  
 Write data.Read(30000)

Can someone help me to resolve this issue? or any in-build method is there in Iris to get the IP.

Have to create a production operation and service for this?

Product version: IRIS 2020.1
Discussion (3)0
Log in or sign up to continue