Toon posts:

Browser detection

Pagina: 1
Acties:
  • 63 views sinds 30-01-2008

Verwijderd

Topicstarter
Ik heb een klein stukje code:

PHP:
1
2
3
4
5
6
<?php
$browser = $_SERVER["HTTP_USER_AGENT"];
if (strpos($browser, "Netscape")){
    die ('Deze site is momenteel alleen geschikt voor Microsoft Internet Explorer.');
}
?>

Als ik de site wil bekijken met Netscape Comunnicator (4.7) geeft hij hem gewoon weer. Terwijl als ik IE invul, dan doet hij het wel.
Mozilla invullen heeft ook geen effect.

[ Voor 9% gewijzigd door Verwijderd op 25-02-2003 11:30 ]


  • whoami
  • Registratie: December 2000
  • Laatst online: 14:41

https://fgheysels.github.io/


  • PolarBear
  • Registratie: Februari 2001
  • Niet online
Ga eens zoeken op User Agents, dan kom je erachter dat de string die jij gebruikt geen User Agent is !

  • drm
  • Registratie: Februari 2001
  • Laatst online: 09-06-2025

drm

f0pc0dert

zie whoami

Music is the pleasure the human mind experiences from counting without being aware that it is counting
~ Gottfried Leibniz


Dit topic is gesloten.