v2.5.2
Giriş yap

php ile cihaz bilgisini çekme

emmir2
646 defa görüntülendi

Merhaba bir log sistemi hazırlıyorum kullandığı cihazı(örnek Samsung A3 İphone 13) php ile nasıl yakalayabilirim

Cevap yaz
Cevaplar (4)
qplot
922 gün önce

https://frubil.info/api_reference.html

<script src="https://js.frubil.info/"></script>
if(FRUBIL.status.value == 1) {
  document.write('Class: ' + FRUBIL.client.class + '<br />');
  document.write('Name: ' + FRUBIL.client.name + ' ' + FRUBIL.client.version + '<br />');
  document.write('OS: ' + FRUBIL.client.os + '<br />');
  document.write('Device class: ' + FRUBIL.device.class + '<br />');
  
  if(FRUBIL.client.isOs('Windows XP', 'Windows 98')) {
  	document.write('OS is Windows XP or Windows 98 <br />');
  }
  else {
  	document.write('OS is not Windows XP or Windows 98 <br />');
  }
  if(FRUBIL.device.isClass('Game console')) {
  	document.write('Device class is Game console <br />');
  }
  else {
  	document.write('Device class is not Game console <br />');
  }
  
} 
kemalgundogdu
922 gün önce

$_SERVER ile bakabilirsin hangi verileri alabileceğine.

frexx
922 gün önce

Burak kardeşim senin verdiğin kod server bilgisinden gelen veri içindir yani sitenin sunucusuna göre ölçülen veriler gelir. Mesala chromeden giriş yapıyorum sitene onun bilgisi gösterir tarayıcı bilgisi vb anlatabildim mi bilmiyorum.

buraktncblk
923 gün önce

user agent ile alabilirsin, bazı cihazlarda user agent içerisinde cihaz bilgisi geliyor.

$_SERVER['HTTP_USER_AGENT']