Link: https://ipinfodb.com/api
function getIPAddress() {
//whether ip is from the share internet
if(!empty($_SERVER['HTTP_CLIENT_IP'])) {
$ip = $_SERVER['HTTP_CLIENT_IP'];
}
//whether ip is from the proxy
elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {
$ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
}
//whether ip is from the remote address
else{
$ip = $_SERVER['REMOTE_ADDR'];
}
return $ip;
}
#### Return
$ip = getIPAddress();
IP-address: ".$ip.";
Download: tại đây
Hiển thị các bài đăng có nhãn IP website. Hiển thị tất cả bài đăng
Hiển thị các bài đăng có nhãn IP website. Hiển thị tất cả bài đăng
Thứ Ba, 30 tháng 6, 2020
Thứ Năm, 11 tháng 6, 2015
xem ip truy cập vào website của bạn
**** code:
$ip = $_SERVER['REMOTE_ADDR'];
$dt = date("l dS \of F Y h:i:s A");
$file=fopen("ip_log.txt","a");
$data = $ip.' '.$dt."\n";
fwrite($file, $data);
fclose($file);
//header( 'Location: http://www.google.com' ) ;
Đăng ký:
Bài đăng (Atom)
