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)
 DynuDNS & Active Users
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

@tomic
Senior Member

USA
1790 Posts

Posted - 28 May 2002 :  03:13:08  Show Profile  Visit @tomic's Homepage  Send @tomic an ICQ Message
Here's a teeny modification for active users that does a reverse lookup of everyone's IP using the server component DynuDNS. This will only work if you have this component available so don't even think of trying it if you have checked with your host and it's not installed on your server.

I did this because today I noticed that lookup rules seemed to have changed and Geektools and some other lookup pages no longer work. Or at least they didn't tonight. If anyone is interested I could post some more code snippets like this that utilize some of the other methods and properties of this component.

Here is the code:

<% if (mlev = 4 or mlev = 3) then
Set mydns = Server.CreateObject("Dynu.DNS")%>
<td valign="middle" align="center"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strDefaultFontColor %>"><% =rs("UserIP")%><br><% =mydns.ReverseLookup(rs("UserIP"))%></a></font></td>
<% Set mydns = nothing
end if %>


This is taken from one of the earlier versions of Active Users(3.0 I think)so if it is not an exact match just look for the code that has mydns because those are the only parts I added but that's all it takes to get the lookup.

@tomic

http://www.skepticfriends.org

Etymon
Advanced Member

United States
2385 Posts

Posted - 29 May 2002 :  11:41:29  Show Profile  Visit Etymon's Homepage

Hey @tomic,

I am interested! Please post more, ok?

Thanks for the code. It's a useful tool!


Cheers,

Etymon

Go to Top of Page

@tomic
Senior Member

USA
1790 Posts

Posted - 31 May 2002 :  03:21:16  Show Profile  Visit @tomic's Homepage  Send @tomic an ICQ Message
I added one more thing that might or not be useful. This tiny MOD now includes IsIPValid. It, oddly enough, checks to see if an IP is valid or not and below the IP and what it resolved it now says Valid IP or Valid IP! depending on how things work out.


<% if (mlev = 4 or mlev = 3) then
Set mydns = Server.CreateObject("Dynu.DNS")%>
<td valign="middle" align="center" width="150"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strDefaultFontColor %>"><% =rs("UserIP")%></font><br><font face="<% =strDefaultFontFace %>" size="<% =strFooterFontSize %>" color="<% =strDefaultFontColor %>"><% =mydns.ReverseLookup(rs("UserIP"))%><br><% If (mydns.IsIPValid(rs("UserIP"))) then Response.Write "Valid IP!" else Response.Write "Invalid IP!" end if %></a></font></td>
<% Set mydns = nothing
end if %>


I think that this is about as useful as DynuDNS gets at least for what I was looking to do.

@tomic

http://www.skepticfriends.org
Go to Top of Page

dayve
Forum Moderator

USA
5820 Posts

Posted - 01 June 2002 :  11:33:11  Show Profile  Visit dayve's Homepage
I personally take advantage of Dynu components as well, but just
for the record, this component being used for this mod is not
free

http://www.dynu.com

____________

http://www.nineinchnailz.com - your source for everything nine inch nails !


Edited by - dayve on 01 June 2002 11:35:09
Go to Top of Page

@tomic
Senior Member

USA
1790 Posts

Posted - 01 June 2002 :  14:56:52  Show Profile  Visit @tomic's Homepage  Send @tomic an ICQ Message
quote:
I personally take advantage of Dynu components as well, but just
for the record, this component being used for this mod is not
free


This is true. It was awfully nice of my host to pay for it.

@tomic

http://www.skepticfriends.org

Edited by - @tomic on 01 June 2002 15:11:55
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.22 seconds. Powered By: Snitz Forums 2000 Version 3.4.07