whats the best way to...

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
bawla
Forum Contributor
Posts: 116
Joined: Fri Mar 19, 2004 9:15 am

whats the best way to...

Post by bawla »

log users and their ips and everything for your site using only php
i couldnt find any scripts of that because i dont know wut they would be called, from your guys experience which way is the best?
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

You can write the information to a text file, or you could log it in a database.

Other than that we probably need a bit more info as to what you are intending to do and what information you are trying to grab.

Mac
malcolmboston
DevNet Resident
Posts: 1826
Joined: Tue Nov 18, 2003 1:09 pm
Location: Middlesbrough, UK

Post by malcolmboston »

are you after a whois online script by any chance?
User avatar
bawla
Forum Contributor
Posts: 116
Joined: Fri Mar 19, 2004 9:15 am

Post by bawla »

i've heard of whois online script but never accually used it

but wut im trying to do is, log visitors
so for example it shows


ip,date, time, brower, all that good stuff,
malcolmboston
DevNet Resident
Posts: 1826
Joined: Tue Nov 18, 2003 1:09 pm
Location: Middlesbrough, UK

Post by malcolmboston »

you can either go for a MySQL solution or a flat file solution
MySQL you just need to use the standard commands
the fwrite and fopen commands is probably the most important command for writing to text files
fopen command
fwrite command

you can also find many of these scripts on:
http://www.hotscripts.com
User avatar
bawla
Forum Contributor
Posts: 116
Joined: Fri Mar 19, 2004 9:15 am

Post by bawla »

i looked on hotscripts but i have no idea wut to look for
jrmontg
Forum Newbie
Posts: 12
Joined: Mon Apr 05, 2004 9:59 am

Post by jrmontg »

In hotscripts check out Web Traffic Analysis

http://www.hotscripts.com/PHP/Scripts_a ... index.html
User avatar
bawla
Forum Contributor
Posts: 116
Joined: Fri Mar 19, 2004 9:15 am

Post by bawla »

thank you very much
User avatar
tim
DevNet Resident
Posts: 1165
Joined: Thu Feb 12, 2004 7:19 pm
Location: ohio

Post by tim »

I believe Strattera (sp?) posted his infamous code for the browers, ip, etc etc @ evilwalrus.com

check it out.
Post Reply