Answered
How to get the user ip address?
Is there any variable in coldfusion that stores user ip address?
Please let me know.
Thank you
Is there any variable in coldfusion that stores user ip address?
Please let me know.
Thank you
I was trying to get my IP from an API (ipify.org), from here I can get the data in JSON format. Can you tell me how I can convert that into a coldfusion variable?
By @Siam Parvez
Yes.
Here's how:
<cfhttp url="https://api.ipify.org?format=json" />
<!--- Conversion: JSON string response to a struct --->
<cfset content=deserializeJSON(cfhttp.filecontent)>
<cfset IP = content.ip>
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.