獲取當前人IP位址

2022-08-10 01:03:17 字數 697 閱讀 5541

/**

* 獲取訪問的ip位址

* @date 2023年11月26日上午11:31:49

//對於通過多個**的情況,第乙個ip為客戶端真實ip,多個ip按照','分割 

if(ipaddress!=null && ipaddress.length()>15) 

} return ipaddress; 

}

只需要把request的引數傳進去就可以拿到ip了。

使用場景:日誌記錄

覺得有用點個關注,謝謝

獲取iOS裝置當前ip位址

第一種方法是用系統api的方式獲取,如下 include include include include include include include include include include include include include include include getaddres...

獲取iOS裝置當前ip位址

第一種方法是用系統api的方式獲取,如下 include include include include include include include include include include include include include include include getaddres...

獲取iOS裝置當前ip位址

第一種方法是用系統api的方式獲取,如下 include include include include include include include include include include include include include include include getaddres...