Đã hoàn thành

export logfiles to mySQL

Before you even start to think read this. Logfile doesnt have any special delimiter but only spaces!

Each logfile on FTP contains 0-XXX daily lines.

All logfiles have the same style of output, divided by space.

example of one logfile:

2007669 08:49:46 05-01-17 CODE-1 NUMERIC 760 text message and so on

1223353 08:49:47 05-01-17 CODE-4 ALPHA 760 text message and so on

1223354 08:49:54 05-01-17 CODE-4 ALPHA 760 text message and so on

1223353 08:53:00 05-01-17 CODE-4 NUMERIC 760 labore et dolore

1227355 08:57:02 05-01-17 CODE-1 ALPHA 760 consectetur adipiscing elit, sed do eiusmod tempor incididunt

1223353 08:58:51 05-01-17 CODE-3 ALPHA 760 Lorem ipsum dolor sit amet, sed do

what I would need in database is:

6 tables extracted from logfiles

example how TABLES should be built from last line of logfile

table1 contains 1223353 (unique number)

table2 contains 08:58:51 (time)

table3 contains 05-01-17 (date)

table4 contains CODE-3 (code[1-4])

table5 contains ALPHA 760 (ALPHA 760 or NUMERIC 760)

table6 contains Lorem ipsum dolor sit amet, sed do (text utf-8)

logfile names by date examples:

[url removed, login to view] - (2017 april 20)

[url removed, login to view] - (2017 april 19)

[url removed, login to view] - (2017 april 18)

working script on which you can continue to build on or create own:

foreach (glob("/path/to/logfiles/*.log") as $file) {

$file_handle = fopen($file, "r");

while (!feof($file_handle)) {

$line = fgets($file_handle);

echo $line;?>

<br />





Script at the moment only reads all logfiles and output them as text on website.

build php script that displays same results as this, just from mySQL ordered by date and time DESCENDING (newer first). All logfiles export to mySQL should happen on click of a button and cron job (1 min run) I will do cron job alone,

Filter the logs which are already in mySQL, so it does not upload them twice/multiple times when I click button (site load is slow). Caution last log file of a day is still updating/being written to (todays [url removed, login to view]).

Kĩ năng: MySQL, PHP

Xem nhiều hơn: php mysql excel export, mysql query export file, mysql query export csv php, php mysql import export outlook, mysql trigger export phpmyadmin, php mysql csv export, oscommerce mysql import export, php mysql pdf export, perl date export mysql csv, php mysql csv export script, php export mysql excel button, mysql ldap export, export mysql excel, export mysql import mssql, ldap export mysql, sql export mysql, sql export mysql database, php script mysql database export, export mysql joomla component, mysql outlook export, mysql howto export, mysql php export excel, php export mysql data pdf, mysql excel export howto, export mysql pdf

Về Bên Thuê:
( 1 Nhận xét ) Bled, Slovenia

ID dự án: #13789328

Được trao cho:


Its is not a Big deal and hence can easily write a script for this . The Thing which i need is 2 days time to proper test in different cases and load. 100% I can do this . If you think you want quality code then pi Thêm

€23 EUR trong 2 ngày
(1 Nhận xét)

3 freelancer đang chào giá trung bình €23 cho công việc này

€23 EUR trong 1 ngày
(7 Nhận xét)

Will deliver in a day

€23 EUR trong 1 ngày
(0 Nhận xét)