help for starter

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
fanukas
Forum Newbie
Posts: 1
Joined: Sun Nov 28, 2004 3:43 pm

help for starter

Post by fanukas »

Hello folks.
I just got some php/mysql project to do, but never used either. So don't know how to begin.
I have to to some log analyzer. And I'm stuck dead.
I have log files which consists:
#some
#coments
No. IP adress MB
1 193.219.60.50 15.58
2 193.219.6.107 255.011
.....................................................
n x.x.x.x y.y

And I need upload data to mysql via php (gonna use phpmyadmin).
I made 6 cols table for No. MB and 4 for ip address (duno if its good to save ip into 4 parts)

Could any one help to do this? I need somewhere to start....
Thanks!
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post by timvw »

is there some rationale behind splitting an ip into 4 parts? what happens with ipv6 ?

as you say you are going to use phpmyadmin, just replace the spaces by commas, and you can upload the logfile as CSV file.

1,193.219.16.50,15.58
2,193.219.5.125,255.011

this would result in 3 columns: no, ip address, mb
Post Reply