Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/Code)
 Queries to list all IP's used by a user
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

NorwegianViking
Junior Member

Denmark
119 Posts

Posted - 09 February 2004 :  05:17:29  Show Profile  Visit NorwegianViking's Homepage
In fighting misbehaveour I have found these queries useful.
Sorted by name, they will list all IP adresses used by each user.
Sorted by IP, they will list all IP adresses and which users that have posted on this.

Note 1: It is only tested with Access, but should also work with SQL server. (and MySql)

Note 2: The code is for use directly in the DB's Query tool.


SELECT DISTINCT Ip, M_id, Name
FROM
(
SELECT DISTINCT FR.R_IP as Ip, FR.R_AUTHOR as M_id, FM.M_NAME as Name
FROM FORUM_MEMBERS FM INNER JOIN FORUM_REPLY FR ON FM.MEMBER_ID = FR.R_AUTHOR

UNION ALL

SELECT DISTINCT FT.T_IP, FT.T_AUTHOR, FM.M_NAME
FROM FORUM_MEMBERS FM INNER JOIN FORUM_TOPICS FT ON FM.MEMBER_ID = FT.T_AUTHOR

UNION ALL

SELECT M_LAST_IP as Ip, MEMBER_ID as M_id, M_NAME as Name
FROM FORUM_MEMBERS

UNION ALL

SELECT M_IP as Ip, MEMBER_ID as M_id, M_NAME as Name
FROM FORUM_MEMBERS

)
ORDER BY Name


Use ORDER BY Name to list all IP adresses used by each user.
Use ORDER BY IP, to list all IP adresses and which users that have posted on this.

kind regards
NorwegianViking

Mod installation for beginners | User registration problems?

Edited by - NorwegianViking on 09 February 2004 05:19:38

sr_erick
Senior Member

USA
1318 Posts

Posted - 09 February 2004 :  11:48:46  Show Profile  Visit sr_erick's Homepage  Send sr_erick a Yahoo! Message
Is this refering to my post in non-forum code?




Erick
Snowmobile Fanatics

Go to Top of Page

redbrad0
Advanced Member

USA
3725 Posts

Posted - 09 February 2004 :  12:17:39  Show Profile  Visit redbrad0's Homepage  Send redbrad0 an AOL message
We have been working on here this http://forum.snitz.com/forum/topic.asp?TOPIC_ID=51180 where it will work for SQL and Access just having a few problems

Brad
Oklahoma City Online Entertainment Guide
Oklahoma Event Tickets
Go to Top of Page

Weed
Starting Member

18 Posts

Posted - 09 February 2004 :  12:33:56  Show Profile
This would make an excellent mod to have. I'm sure I am not the only person who has users that sign up over and over.

Edited by - Weed on 09 February 2004 17:54:04
Go to Top of Page

NorwegianViking
Junior Member

Denmark
119 Posts

Posted - 10 February 2004 :  08:39:41  Show Profile  Visit NorwegianViking's Homepage
sr_eric,

Absolutely. I posted a link to this topic in the one you started.
I just didn't want to clutter that topic with this.
Except that I skip the Reply_ID, as I see no use for it.

I don't know enough ASP (yet) to make this a MOD.
I could always get it together into a sqlString, but I havn't studied how to show the records with ASP yet.

kind regards
NorwegianViking

Mod installation for beginners | User registration problems?
Go to Top of Page

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 14 February 2004 :  17:41:14  Show Profile
I converted the two into a working mod (with a bit of help on a single variable from a guy on Expert's Exchange) for those who want it. See http://forum.snitz.com/forum/topic.asp?TOPIC_ID=51180].
Go to Top of Page

Weed
Starting Member

18 Posts

Posted - 15 February 2004 :  00:24:33  Show Profile
Well done Carefree. Works like a charm. Maybe I shoud have explained myself a bit better though. What I was thinking of is a mod that could advise you of members who have signed up 2 or 3 times with different logins by looking for duplicate ip's.
Go to Top of Page

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 15 February 2004 :  10:27:30  Show Profile
I'll write that one next (unless someone beats me to it).

As written, the current modification is for Snitz v 3.4.04 and uses a single change to pop_profile.asp (adds a link for moderators and admins) which will give you a quick report of all IPs used by a particular user.

This will come in handy if you ever intend to ban someone.

Get a copy here: http://CarefreeComputing.net/forum/mods/UniqueIPs.zip
Go to Top of Page

Weed
Starting Member

18 Posts

Posted - 15 February 2004 :  14:58:43  Show Profile
By the way I tried registering on your forum but I get:

quote:
Microsoft JET Database Engine error '80040e14'

The INSERT INTO statement contains the following unknown field name: 'M_AVATAR'. Make sure you have typed the name correctly, and try the operation again.

/forum/register.asp, line 602

I did not choose an avatar but was forced to choose a size.
Go to Top of Page

miperez
Junior Member

Spain
243 Posts

Posted - 16 February 2004 :  12:36:19  Show Profile
I downloaded it, and it works great!

Just one comment: I really don't understand why you call it "User's unique IP MOD", it might give users a false impression about what it is going to do, like forcing them to use only one address or something; I'd call it "User's IP list MOD", or similar.

Just as a suggestion for a really good MOD, anyway

Best Regards

Mikel Perez

"Hell is the place where everything test perfectly, and nothing works"

Edited by - miperez on 16 February 2004 12:40:22
Go to Top of Page

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 16 February 2004 :  15:23:04  Show Profile
Norwegian Viking's original script works fine incorporated into an ASP page with a link; however, it displays a list of all IPs used and doesn't filter out the unique ones. It does show you (by means of multiple names with the IPs used) any duplicates. I'm trying to write a subscript which will remove any IPs used only once but so far I've not had a great deal of success LOL.

If anyone wants to take a stab at writing the filtering subscript, please feel free. The file which needs it is pop_dupeIP.asp.

If you use a WHERE script like this one, then you can't rename the IP, name, ID info above it and the whole thing will have to be redone.


strSql = strSql & " WHERE ((M_IP=FT.T_IP AND FT.T_AUTHOR<>MEMBER_ID) OR (FT.T_AUTHOR<>MEMBER_ID AND M_LAST_IP=FT.T_IP) OR (FR.R_IP=M_LAST_IP AND MEMBER_ID<>FR.R_AUTHOR) OR (FT.T_AUTHOR<>MEMBER_ID AND FR.R_IP=FT.T_IP))"

http://carefreecomputing.net/forum/mods/MemberIPSearch.zip

This zip contains both routines and a readme which shows how to add links to both in pop_profile.asp.

Edited by - Carefree on 16 February 2004 15:44:39
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.2 seconds. Powered By: Snitz Forums 2000 Version 3.4.07