Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Feb 2000
Posts: 15
Junior Member
Junior Member
Offline
Joined: Feb 2000
Posts: 15
Difficulty = NONE
Rating = Gets the job done!
what it does =
The display IP page does only that Displays IP, this hack as simple as it may be now displays IP and HOST!
files to be modified = postings.cgi

find:
if ($ThisIP eq "") {
&StandardHTML("Sorry, we could not find a record for that post. Perhaps someone recently deleted it.");
exit;
}

and right after it add:
$ThisDomain = gethostbyaddr(inet_aton($ThisIP), AF_INET);


then find:
$ThisIP

and replace it with:
$ThisIP $ThisDomain


You should now get the hostname diplayed as well as the IP address. This has been tested fine on version's UPTO 5.43b not 5.44.

enjoy, it

Digital Paul Out~

Sponsored Links
Joined: Feb 2000
Posts: 25
Member
Member
Offline
Joined: Feb 2000
Posts: 25
Paul-

Thanks for the hack [Linked Image] Simple yet effective and a nice admin feature to have.

BTW, works fine on 5.44 as well.

-Chris

------------------
Chris Schreiber
[email protected]
Fast 4GL Systems, Inc.
http://www.fast4gl.com/
UBB: http://www.progresstalk.com/

Joined: Feb 2000
Posts: 15
Junior Member
Junior Member
Offline
Joined: Feb 2000
Posts: 15
thanks dude,
i cant be bothered to upgrade to the latest version, even with beyond compare, i have just gotten youst to the cgi layout of the script and bits are all over the place! in the new one!

Glad it works for all!

my saying is if it aint broke dont fix it!

Joined: Feb 1999
Posts: 1,379
cal Offline
Programmer
Programmer
Offline
Joined: Feb 1999
Posts: 1,379
Nice hack

Just a thought [Linked Image]

Joined: Jan 2000
Posts: 64
Member
Member
Offline
Joined: Jan 2000
Posts: 64
I like it, make it do more!

quick easy and an improvement
Thanx!

Sponsored Links
Joined: Jun 2000
Posts: 263
Junior Member
Junior Member
Offline
Joined: Jun 2000
Posts: 263
Nice hack indeed! [Linked Image]

Joined: Feb 2000
Posts: 15
Junior Member
Junior Member
Offline
Joined: Feb 2000
Posts: 15
what else would you like to see??

i made this quite a while ago, but never thought of making it display more???

ideas anyone?



------------------
Email : [email protected]
Website : Not ready yet
Ubb : http://duw.virtualave.net/cgi-bin/Ultimate.cgi

Joined: Feb 2000
Posts: 116
Member
Member
Offline
Joined: Feb 2000
Posts: 116
Great Job I love it

------------------
Please Join My UBB
We are now accepting Moderators!!

Joined: Mar 2000
Posts: 204
Member
Member
Offline
Joined: Mar 2000
Posts: 204
Nice Hack DU.

Just thought I'd do a little "Spring Cleaning" on this hack:


find:
Code
code:

And replace it with:
Code
code:

This'll show who's IP and Hostname you're looking at.

Then, find:
Code
code:

And directly under it add:
Code
code:

Then, find:
Code
code:

and delete that..

It'll just show the IP and Hostname of that person.

It looks a lot better for me this way.


-Never Underestimate The Power Of Stupid People In Large Groups.
Joined: Feb 1999
Posts: 1,379
cal Offline
Programmer
Programmer
Offline
Joined: Feb 1999
Posts: 1,379
Tidier!

Just a thought [Linked Image]

Sponsored Links
Joined: Feb 2000
Posts: 15
Junior Member
Junior Member
Offline
Joined: Feb 2000
Posts: 15
you have it, looks much better, i was admittidly very lazy on this hack, lol!

very tidy!

Joined: Mar 2000
Posts: 204
Member
Member
Offline
Joined: Mar 2000
Posts: 204
Okay. I've got a little problem with this hack. For some of my members it will only log an IP, and not the hostname.

Why is that?

I mean, it will work fine for some and log both IP and hostname, but only the IP on the other members. Is this a problem with the hack or is it a problem with the persons ISP? Or is it even a problem at all?


Later


-Never Underestimate The Power Of Stupid People In Large Groups.
Joined: Feb 2000
Posts: 25
Member
Member
Offline
Joined: Feb 2000
Posts: 25
Oddkick-

This is normal, not all IP address can be resolved to a hostname.

HTH.

-Chris

------------------
Chris Schreiber
[email protected]
Fast 4GL Systems, Inc.
UBB: http://www.progresstalk.com/

Joined: Mar 2000
Posts: 204
Member
Member
Offline
Joined: Mar 2000
Posts: 204
Heh... sorry. I'm sorta new to this.

How does an IP get resolved to a hostname??


-Never Underestimate The Power Of Stupid People In Large Groups.
Joined: Feb 1999
Posts: 1,379
cal Offline
Programmer
Programmer
Offline
Joined: Feb 1999
Posts: 1,379
It actually happens the other way round (Usually). Anyway, it's the client's browser which sends (or doesn't) the two pieces of information. Many machines don't have a hostname, or will give their IP.

Just a thought [Linked Image]

Joined: Aug 2000
Posts: 3,590
Moderator
Moderator
Offline
Joined: Aug 2000
Posts: 3,590
Does anyone have an example of this hack in action because I can't seem to get it to show up on mine (5.39c)

Joined: Aug 2000
Posts: 3,590
Moderator
Moderator
Offline
Joined: Aug 2000
Posts: 3,590
OOPS!

Joined: Feb 2000
Posts: 2
Junior Member
Junior Member
Offline
Joined: Feb 2000
Posts: 2
Okay, Did this hack Word for word, letter for letter I cannot get it to work. I am using it on 5.44 also. As a matter of fact, all the postings on my test page are gone also. [Linked Image]
I am going to try it on 5.43 and see if it does the same. [Linked Image] Lisa

HELP!!

------------------
In reality our fellow citizen's have not sunk so low as we feared, because
they had never risen so high as we believed. (Freud)

Joined: Aug 2000
Posts: 3,590
Moderator
Moderator
Offline
Joined: Aug 2000
Posts: 3,590
I just installed this hack flawlessly in version 5.45c. Since I can get real snoopy about the troublemakers on my Board and their alter egos, I use this feature a lot... this hack was a welcome addition, as it gives me even more info than before. Many thanks to Digital Paul for this, installing it made me feel like I actually knew what I was doing (after my last four failed hack attempts). So I had a little "quirk" with the fact that, when both of the above modifications are added, you lose the Post info (it's more of a reminder than annoying to me), and the Hostname displays both after the IP in the first row, but also in its own second row. Below is what I have modified and added to my board to give you the name of the Member whose IP you requested at the the top of the page, the IP alone (without the Host Name after it), the Host Name in a separate row below the IP, and the Post info (with info on how to remove the post info if you wish). It also adds a colon after the IP and Host "row titles", cuz I'm anal like that. [Linked Image]

Either way, you can use your particular preference to flawlessly apply this hack using the code below.


In postings.cgi:

(This will add the command that determines the host name, this is a necessary step)

Find:
Code
code:

And on a new line directly underneath the last }, add:
Code
code:

(This step adds the User Name associated with the requested IP and Hostname to the top of the IP page)

Now Find:
Code
code:

And replace it with:
Code
code:

(This will add a colon after "IP Number", this step is not necessary if you don't care, I did though [Linked Image])

Find:
Code
code:

And replace it with:
Code
code:

(If you added the colon as listed above, this will add a second row beneath the IP number display to show the Hostname WITH a colon)
(If you didn't add the colon as listed above, skip this step and use the next one)

Find:
Code
code:

And on a new line, directly underneath it, add:
Code
code:

(If you didn't add the colon as listed above, this will add a second row beneath the IP number display to show the Hostname WITHOUT a colon)
(If you DID add the colon as listed two steps above, ignore this step and use the step directly above this one, if you've already done the step above, skip this step)

Find:
Code
code:

And on a new line, directly underneath it, add:
Code
code:

(If you want to remove the body of the post underneath the IP and Hostname, follow this next step - if not, skip to the next step)

Find:
Code
code:

And delete it.

There isn't a next step. You're finished. Backup your original postings.cgi and upload the file to your UBB cgi folder in ASCII format. Make sure you set the CHMOD to 755, and you're all set. You don't need to update threads or anything else, just click on the IP link, authenticate yourself and enjoy!

Again, thanks to Digital Paul for this cool little hack. This should be added to the "Additions" database.

Joined: May 2000
Posts: 8
Junior Member
Junior Member
Offline
Joined: May 2000
Posts: 8
I get a "Staff Use Only" beside the IP icon...
how to remove that text?

------------------
Squall14

Joined: Aug 2000
Posts: 3,590
Moderator
Moderator
Offline
Joined: Aug 2000
Posts: 3,590
I don't think you got that from using the code above, I think that's part of a Custom Layout hack or something. 'Course, who am I to guess, I know jack [censored] compared to most folks here. [Linked Image]


Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
Nettomo
Nettomo
Germany, Bremen
Posts: 417
Joined: November 2001
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)