瀏覽器指紋 fingerprintjs

使用示例:

<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <input value="" id="input" style="width: 300px;" />
  <div id="user"></div>
  <script>
    const fpPromise = import('https://openfpcdn.io/fingerprintjs/v3')
      .then(e => e.load())
    fpPromise
      .then(fp => fp.get())
      .then(result => {
        const visitorId = result.visitorId
        console.log(visitorId)
        document.getElementById('input').value = visitorId
        document.getElementById('user').innerHTML = window.navigator.userAgent.toLowerCase()
      })
  </script>
</body>

</html>

 

官方:

https://github.com/fingerprintjs/fingerprintjs

 

 

 

 

 

.

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章