Go Back   CodingForums.com > :: Server side development > Other server side languages/ issues

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 01-22-2003, 12:37 AM   PM User | #1
Mars
New Coder

 
Join Date: Nov 2002
Posts: 29
Thanks: 0
Thanked 0 Times in 0 Posts
Mars is an unknown quantity at this point
IP Logging

Is it possible to log user IPs through html...to be sure a person isnt posting as someone else
__________________
A computer is like air conditioning...open windows and it stops working.

Last edited by WA; 01-22-2003 at 01:26 AM..
Mars is offline   Reply With Quote
Old 01-22-2003, 01:16 AM   PM User | #2
cg9com
Senior Coder

 
Join Date: Jul 2002
Posts: 1,628
Thanks: 0
Thanked 0 Times in 0 Posts
cg9com is an unknown quantity at this point
http://javascriptkit.com/script/script2/displayip.shtml

REMOTE_ADDR

i like your sig hehehe
__________________

Moderator: General web building

Get out from under them, resist and multiply.
Get out from under precipice and see the sky.
cg9com is offline   Reply With Quote
Old 01-22-2003, 01:30 AM   PM User | #3
Mars
New Coder

 
Join Date: Nov 2002
Posts: 29
Thanks: 0
Thanked 0 Times in 0 Posts
Mars is an unknown quantity at this point
thx

hehe...thank you
__________________
A computer is like air conditioning...open windows and it stops working.
Mars is offline   Reply With Quote
Old 01-22-2003, 01:32 AM   PM User | #4
cg9com
Senior Coder

 
Join Date: Jul 2002
Posts: 1,628
Thanks: 0
Thanked 0 Times in 0 Posts
cg9com is an unknown quantity at this point
you dont have server side access?
you could simply echo an IP in one line of code
that script wont log an IP just display it
__________________

Moderator: General web building

Get out from under them, resist and multiply.
Get out from under precipice and see the sky.
cg9com is offline   Reply With Quote
Old 01-22-2003, 01:42 AM   PM User | #5
Mars
New Coder

 
Join Date: Nov 2002
Posts: 29
Thanks: 0
Thanked 0 Times in 0 Posts
Mars is an unknown quantity at this point
ohhh

it displayed but i want to log it...do you have a messenger? yahoo or msn?
__________________
A computer is like air conditioning...open windows and it stops working.
Mars is offline   Reply With Quote
Old 01-22-2003, 01:55 AM   PM User | #6
cg9com
Senior Coder

 
Join Date: Jul 2002
Posts: 1,628
Thanks: 0
Thanked 0 Times in 0 Posts
cg9com is an unknown quantity at this point
um, yea check my profile
sorry i wasnt paying attention at first, doing 2 much at once
but you couldnt log an IP with html
__________________

Moderator: General web building

Get out from under them, resist and multiply.
Get out from under precipice and see the sky.
cg9com is offline   Reply With Quote
Old 02-13-2003, 05:58 PM   PM User | #7
MUBNET
New Coder

 
Join Date: Jul 2002
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
MUBNET is an unknown quantity at this point
Thumbs down Heyy....

This script works wrong.It shows my IP.But it's worng IP.

I check my IP by the Dial-Up Wizard in WinXP(you know it has properties of client and server IPs).

It is so... so yuck....
__________________
Do you know Hakki Ocal ?
MUBNET is offline   Reply With Quote
Old 02-13-2003, 10:17 PM   PM User | #8
redhead
Regular Coder

 
Join Date: Jun 2002
Location: United Kingdom Confused: Often
Posts: 859
Thanks: 0
Thanked 0 Times in 0 Posts
redhead is an unknown quantity at this point
that script will only work in you have server side includes supported on your server... and even if you did i wouldnt use javascript to then put it in the box... id use <input ....... value="<!--#echo var="REMOTE_ADDR"-->"...

presuming you have PHP supported, heres something that should store the IP address...
PHP Code:
<?php
// get the IP
$ip $_SERVER["REMOTE_ADDR"];
$ip .= "\n" implode(''file('ips.dat'));

// write into the IPs file
$fq fopen("ips.dat","w");
fwrite($fq$ip); 
fclose($fq);
?>
hope that helps you abit...
__________________
redhead

Last edited by redhead; 02-13-2003 at 10:19 PM..
redhead is offline   Reply With Quote
Old 09-28-2010, 11:32 PM   PM User | #9
djdubuque
New Coder

 
Join Date: May 2009
Posts: 47
Thanks: 2
Thanked 0 Times in 0 Posts
djdubuque is an unknown quantity at this point
Quote:
Originally Posted by redhead View Post
that script will only work in you have server side includes supported on your server... and even if you did i wouldnt use javascript to then put it in the box... id use <input ....... value="<!--#echo var="REMOTE_ADDR"-->"...

presuming you have PHP supported, heres something that should store the IP address...
PHP Code:
<?php
// get the IP
$ip $_SERVER["REMOTE_ADDR"];
$ip .= "\n" implode(''file('ips.dat'));

// write into the IPs file
$fq fopen("ips.dat","w");
fwrite($fq$ip); 
fclose($fq);
?>
hope that helps you abit...
How do I get this to add the IPs one per line?

right now it will just add them on one line.
djdubuque is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 04:58 AM.


Advertisement
Log in to turn off these ads.