The function is ok, but I want to store client' ip in a log file and in a table, so how can execute it in a procedure??