I have website where i provide different services.When users log in i want to monitor all that they do and store them up in a log file of that particular user and send them an email weekly to the users of what they have done and what services they have used.I also want to monitor users who try to inject malcious code and rank them according to their activity and send a warning email to them.I use wamp server.How should i do all these things.
This is a difficult question to answer because it's very general. Still, here are a few things to think about:
Most of what you are asking for seems to be at the application layer. If for example you have a website written in php you could use seomthing like this tutorial to do user logging.
As for your idea of monitoring users who try to inject malicious code, you probably want instead to write a robust web application where that sort of thing is minimized (for example, by sanitizing input).
Beyond all of that you can use good system management practices to ensure your server is secure, by doing things like keeping current on security patches and properly configuring your firewall.