$user_ip = CRM_Utils_System::ipAddress();
CRM_Core_Error::debug_log_message('User IP address: ' . CRM_Utils_System::ipAddress());
$ip_address = CRM_Utils_System::ipAddress(); $params = array( 'ip_address' => $ip_address ); $report_url = CRM_Report_Utils_Report::getNextUrl('crm/filename', $params);This code will retrieve the IP address of the user accessing the CRM and use it as a filter parameter for a custom report. Package library: The getNextUrl function is part of the CiviCRM package library.