Dit helemaal bovenaan je homepagina zetten (bestand moet een .php bestand zijn):
PHP-code:
<?php
$pdaURL="http://www.wittebal.nl/pda/";
$agent=$HTTP_USER_AGENT;
if (stristr($agent,"mobipocket") ||
stristr($agent,"mazingo") ||
stristr($agent,"silo") ||
stristr($agent,"pluck") ||
stristr($agent,"avantgo") ||
stristr($agent,"blazer") ||
stristr($agent,"pendragon") ||
stristr($agent,"hand") ||
stristr($agent,"palm") ||
stristr($agent,"blackberry") ||
stristr($agent,"xiino") ||
stristr($agent,"portalmmm") ||
stristr($agent,"epoc") ||
stristr($agent,"symbian") ||
stristr($agent,"ericsson") ||
stristr($agent,"downloadsession") ||
stristr($agent,"elaine") ||
stristr($agent,"embedix") ||
stristr($agent,"opera") ||
stristr($agent,"netfront") ) {
Header("Location: ".$pdaURL);
echo "Klik <a href=\"$pdaURL\">hier</a> wanneer u niet automatisch doorgestuurd wordt naar de speciale PDA site.";
exit;
}
?>