Am Mon, 14 Dec 2009 23:14:37 +0100 schrieb Jochen Lehmeier:
> On Mon, 14 Dec 2009 22:41:45 +0100, Markus R. Keßler <>
> wrote:
>
>>>> But, because the script is called from itself,
>>>
>>> Why?
>>
>> I just want to have one file doing the job.
>
> You mean your script outputs the <form> if there are no input
> parameters; if there are input parameters (as submitted by the form) you
> process them.
Yes, that's what the script does!
So it was slightly misleading to say "self-calling". Sorry.
> That's fine and standard.
>
> If you say "the script is called from itself" I interpret it as "the
> script calls itself" (maybe using system()) or whatever; also, for your
> server's IP to appear in the Apache (?) logfile, the HTTP connection for
> the request would have to originate from the server. But, looking at
> your source code, it looks like I misunderstood you there.
> I also fail to see how you could end up with your server's IP in the
> logfile. The second request seems to come from the browser just fine, so
> Apache should log the user's IP.
Yes, there's the Apache logfile also, which shows the "real" IP in one
line when the script is called for the first time and without parameter.
And the following line, when clicking on "submit" the "remote address"
environment variable contains the IP of the server.
So, getting the "real" user's IP can be easily done by grepping the
Apache logfile. But:
- for convenience purposes I'd like to have a separate logfile
- the user could load the script (without parameters) and leave the
browser for any time period.
So, when clicking the "submit" button, let's say, hours later, it would
be nearly impossible to determine which call of the script (with
parameters) is related to the first call with the "real" user's IP.
The background is: I wrote a little "diary" application which stores my
ideas, and, at least I want to see which "hacking attempts" occur to this
application. That's the point.
Any idea how to get the "real" IP at _any_ time the script is called
directly or indirectly?
Best regards,
Markus
--
Please reply to group only.
For private email please use
http://www.dipl-ing-kessler.de/email.htm