Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.php > #10020
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail |
|---|---|
| From | Arno Welzel <usenet@arnowelzel.de> |
| Newsgroups | comp.lang.php |
| Subject | Re: tracking IP's |
| Date | Tue, 02 Jul 2013 10:53:01 +0200 |
| Lines | 40 |
| Message-ID | <51D294ED.5030706@arnowelzel.de> (permalink) |
| References | <h54uiific0f9$.k8umottu5xrj.dlg@40tude.net> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=ISO-8859-1 |
| Content-Transfer-Encoding | 7bit |
| X-Trace | individual.net XYTTidr0YuBAQMlY5KuivgLpXT299MsqBme/5EncfInR4iuV4K |
| Cancel-Lock | sha1:O5Mj2XWB/DpBHEYG6lhX7k/bjnY= |
| User-Agent | Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130620 Thunderbird/17.0.7 |
| In-Reply-To | <h54uiific0f9$.k8umottu5xrj.dlg@40tude.net> |
| Xref | csiph.com comp.lang.php:10020 |
Show key headers only | View raw
Am 02.07.2013 02:37, schrieb richard:
> I want a simple script that will keep track of IP's in a mysql table.
>
> This script works. But puts the IP in a text file.
> It's ok, but doesn't seem to detect any other IP but mine.
> I know this because my hit counter shows there has been new visitors.
How do you check the counter? If you refresh the page with the counter
in your browser this is of course also a hit - but just by you.
> $ipaddress = $_SERVER['REMOTE_ADDR'];
> $date = date ("M dS H:i:s");
>
> $message = "$page _ $ipaddress _ $date\n";
>
> $File = "track.txt";
> $Open = fopen($File, "a+");
> if ($Open){
>
> fwrite($Open, "$message");
> fclose ($Open);
> }
>
>
> I have been looking around for a script but can't seem to find one that
> works the way I want.
> anyone have such a script online somewhere?
A script is not enough - you also need a database and a table for this.
Try to learn PHP and at least the basics of SQL and do not just
copy&paste - otherwise you will have scripts with security holes just
because you don't understand what the scripts really do and you don't
see the security problems in the code.
--
Arno Welzel
http://arnowelzel.de
http://de-rec-fahrrad.de
Back to comp.lang.php | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
tracking IP's richard <noreply@example.com> - 2013-07-01 20:37 -0400 Re: tracking IP's Doug Miller <doug_at_milmac_dot_com@example.com> - 2013-07-02 02:03 +0000 Re: tracking IP's Arno Welzel <usenet@arnowelzel.de> - 2013-07-02 10:53 +0200 Re: tracking IP's The Natural Philosopher <tnp@invalid.invalid> - 2013-07-02 09:55 +0100
csiph-web