Share Nhận Diện Trình Duyệt & Hệ Điều Hành

  • Thread starter Thread starter AdminAdmin is verified member.
  • Start date Start date
Admin

AdminAdmin is verified member.

Well-Known Member
Staff member
Administrator
Code chủ yếu edit lại thôi chứ cũng chưa đủ sức ngồi preg_match nguyên một cục chóng mặt.

Demo: http://demo.zlolz.net/ua/

Cách dùng:
1. Download: browser-and-os-detect.zip
2. Giải nén
3. Mở file useragent.php để thiết lập. Chú thích rõ trong file useragent.php rồi :p
4. Up lên host
5. Include file php vào nơi bạn muốn dùng.
6. Gọi hàm display_useragent() ở nơi muốn hiển thị là xong :)

P/S: Muốn thay đổi icon sao tùy bạn. Nên dùng một bộ icon giống nhau để hiển thị cho đẹp :)

Đặc điểm của code:
+ Nhận diện được các trình duyệt thông dụng. Chưa test với UC của Tàu Khựa
+ Nhận diện được hệ điều hành, nền tảng (Java, Android...)
+ Nhận diện được các trình duyệt web (ít ai dùng cái này :p)
+ Có thể hiển thị icon tùy theo trình duyệt/HĐH
+ Có thể dẫn link đến trang chủ của trình duyệt/HĐH
 

Facebook Comments

Similar threads

Admin
Replies
0
Views
1K
AdminAdmin is verified member.
Admin
Admin
Replies
0
Views
2K
AdminAdmin is verified member.
Admin
Admin
Replies
0
Views
1K
AdminAdmin is verified member.
Admin
Admin
Replies
0
Views
752
AdminAdmin is verified member.
Admin
Back
Top