Gossamer Forum
Home : Products : DBMan : Customization :

How can i store IP address in Database?

Quote Reply
How can i store IP address in Database?
How can i store IP address in Database by using auto generate?

i use

Quote:
IP => [10, 'numer', -1, 17, 1, '$ENV{REMOTE_HOST}', ''],

but it doesn't work
it just store $ENV{REMOTE_HOST} in the data
Quote Reply
Re: How can i store IP address in Database? In reply to
You're right. That won't work.

I have no idea at all if this will work either, but you might, instead of

'$ENV{REMOTE_HOST}'

try

"$ENV{REMOTE_HOST}"

If that doesn't work, you'll probably have to set the variable within sub add_record in db.cgi.

after

($auth_user_field >= 0) and ($in{$db_cols[$auth_user_field]} = $db_userid);

add

$in{'IP'} = $ENV{REMOTE_HOST};

That should work.

------------------
JPD





Quote Reply
Re: How can i store IP address in Database? In reply to
Hi,

Anyone tried this mod ?

I test this one according to JPDeni's direction, but nothing was saved on db.

Even, the IP address was not shown up.
Seems the mod doesn't read IP address either.

Anyone done ?
Help me.


[This message has been edited by koreags (edited June 28, 1999).]
Quote Reply
Re: How can i store IP address in Database? In reply to
It seems that these variables work on some servers but not on others. I don't know why. Possibly someone else does.


------------------
JPD





Quote Reply
Re: How can i store IP address in Database? In reply to
It work for me.
when i set the variable within sub add_record in db.cgi.


------------------
Stan
wwhoong2@hotmail.com



[This message has been edited by stanley (edited June 28, 1999).]
Quote Reply
Re: How can i store IP address in Database? In reply to
Of course, one of the problems with storing IP Addresses is that most ISP dynamically assign IP Addresses to users. The reason I am tempted to install this modification is to provide extra information of users so that if spamming occurs, I can have proof. But this mod does not address dynamic IP addresses.

------------------
Eliot Lee
Founder and Editor
Anthro TECH, L.L.C
http://www.anthrotech.com/
info@anthrotech.com
==========================
Coconino Community College
http://www.coco.cc.az.us/
Web Technology
Coordinator
elee@coco.cc.az.us
Quote Reply
Re: How can i store IP address in Database? In reply to
Hi

Someone sent some abusive stuff to me the other day using a form on my web site. The IP address was logged, I forwarded the message to the ISP and got this back: "We have located the user that did this and his account has been suspended
for an undefined time..
His Mother has been notified and has a copy of the email.
She also was not happy with what she read and is taking steps to reprimand
him."
So I guess this means that (most/all?) ISP's keep logs of phone numbers / allocated IP addresses.

Chris
Quote Reply
Re: How can i store IP address in Database? In reply to
Well, they can log activity based on IP Address. However, when I access the Net via my commercial ISP, I am assigned a different IP Address each session.

------------------
Eliot Lee
Founder and Editor
Anthro TECH, L.L.C
http://www.anthrotech.com/
info@anthrotech.com
==========================
Coconino Community College
http://www.coco.cc.az.us/
Web Technology
Coordinator
elee@coco.cc.az.us

[This message has been edited by Eliot (edited August 03, 1999).]
Quote Reply
Re: How can i store IP address in Database? In reply to
Hi Eliot

This was a dynamic one too:

Quote:
>Official Name: dialup-91.infinityonline.com.au
>IP address: 203.87.24.141

They (and other ISP, I guess...) must keep logs of which IP address is used by which phone number and when...

Chris

Quote Reply
Re: How can i store IP address in Database? In reply to
Thanks for the info.

Regards,

------------------
Eliot Lee
Founder and Editor
Anthro TECH, L.L.C
http://www.anthrotech.com/
info@anthrotech.com
==========================
Coconino Community College
http://www.coco.cc.az.us/
Web Technology
Coordinator
elee@coco.cc.az.us