Check log for specific words
I need to check my log file that is placed in amxmodx/logs for specific words (actualy I need to check if the map, that is being currently played, name is written in the log). And if the log contains the map name than do nothing, and if doesn't contain - do something. And one more thing: the code should 'understand' the diffrence between de_dust and de_dust2 (these two are 'diffrent words').
|
Re: Check log for specific words
You need :
- open_dir() : To open the directory wanted. - next_file() : To read the next file in the directory handle. - fopen() / fgets() / fclose() : To open the file, reading each line, and closing the file. And while reading each line, you would need to use something like contain(). But depending what you need to find, you may want to try regex. |
Re: Check log for specific words
I don't understand, need example :?
|
Re: Check log for specific words
Here ->
PHP Code:
|
Re: Check log for specific words
Damn I've read too fastly. I've confused with another plugin which read files in a specific directory. http://workshop.mixedberry.net/Smile...on/th_045_.gif
|
Re: Check log for specific words
Hey onion!
|
Re: Check log for specific words
Thx Alka!
|
| All times are GMT -4. The time now is 15:12. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.