I need the ability to track 404 errors and write them to the database(id, url, date) how to implement this?

2 Answers 2

server logs is not enough?
  • if they cannot be entered in the database, then no – Asian Assault Nov 8 '19 at 22:43
  • [[m4f1]], it’s very possible.You can make a script that checks the log once a day, find the necessary queries in the log, and enter the necessary data into the database.I made simple statistics on my website in the same way.Make this script run in cron. – Dead Dotterel Nov 8 '19 at 23:47
  • [[DollaR84]], in fact this is what you need, can you share an example? – Asian Assault Nov 8 '19 at 23:54
  • [[m4f1]], ok, now I’ll select the necessary functionality, and put it here – Dead Dotterel Nov 9 '19 at 00:16
  • [[DollaR84]], thank you – Asian Assault Nov 9 '19 at 00:17
on page 404 place the write code in the database type +1)))
  • as an option, if of course there was an opportunity to touch the engine and output page 404) – Asian Assault Nov 8 '19 at 23:54