Oops, I didn't see that it ended with .html ... I have .html parsed on
my system as PHP.
On Sun, 14 Dec 2003 11:44:35 +0100, "Henk Verhoeven"
<news@metaclassREMOVE-THIS.nl> wrote:
[color=blue]
>why don't you write an index.php instead of an index.html and put your
>"$logged_string = "$REMOTE_ADDR..." in there?
>
>Henk Verhoeven,
>
www.metaclass.nl
>
>"TJ" <tgillette1@cox.net> wrote in message
>news:gGSCb.4039$JD6.2573@lakeread04...[color=green]
>> PHP Gurus,
>>
>> I'd like to be able to capture the IP address of a visitor to my webpage.
>> I'm using the following code snippet within my HTML. I do not want the[/color]
>user[color=green]
>> to have to push a button or click on something to call the post or get
>> command to do this. What must I put in the file for this to happen
>> automatically when someone opens my index.html page? Obviously something
>> other than form method="post" or get that I have in the file now. How can[/color]
>I[color=green]
>> do this?
>>
>> Thanks in advance!
>>
>> <form method="post" action="<?php echo $PHP_SELF?>">
>>
>> <?php
>> $logged_string = "$REMOTE_ADDR|" . date("j M Y g:i a");
>> $file = fopen("userIP.log", "a");
>> fputs($file, $logged_string, strlen($logged_string));
>> fputs($file, "\r\n");
>> print("\n");
>> fclose($file);
>> ?>
>>
>> </form>
>>
>>[/color]
>
>[/color]