How to get client ip address

hello friends , i want to get client ip address , what is the best way in owncloud? i check IRequest , where i have to check for this request?

have you tried looking in /var/log/apache2/access.log

You could check $_SERVER