How would i implement an ip logger?

Try to use the code OxyDac tried to remove here.