@Fox said in How to color logs?:
log_html("<span style='color:yellow'>Test log</span>")
hello can you help me? what if I want to make the text in the center position log_html("<span style='color:yellow'>Test log</span>")
Need to check the IP via web response.
You need to get back the information from third party services, they are limitless, some examples:
https://www.maxmind.com/en/locate-my-ip-address
https://ipapi.co/json/
https://ifconfig.me/
After info received, simple parse the result.
Good luck!
For those who needs this later, you can set up http proxy and send a simple get request to https://api.ipify.org , it will give you the ip adress in plain text, no need to parse the json.
One of many simple and easy ways to do it.