Arkadaslar boyle bir kod ile musterilerime bu sayfaya girdiklerinde bilgisayarlarinin ozelliklerine gore otomatikman gereken dosyanin inmesini saglamak istiyorum windows icin problem yok ama mac sayfaya girdigi zaman indirmesi gereken dosyayi karakter olarak aciyor ekrana ozel bir kod varmidir mac icin girdigi zaman sayfaya direk dosyayi indirmeye baslasin ?
Alıntı
<?php
$ubr = $_SERVER['HTTP_USER_AGENT'];
$win = "windows";
$mac = "mac";
$ipad = "ipad";
if (preg_match("'(".$win.")'si","'(".$ubr.")'si")){
header('Location:
http://www.xxx.com/remote/Remote%20Support.exe');
} else if (preg_match("'(".$mac.")'si","'(".$ubr.")'si")) {
header('Location:
http://www.xxx.com/remote/Remote%20Support.dmg');
} else if (preg_match("'(".$ipad.")'si","'(".$ubr.")'si")) {
echo '<script language="javascript">alert("ALERT")</script>';
header('Location:
http://www.xx.com/');
} else {
echo '<script language="javascript">alert("ALERT")</script>';
header('Location: http://www.xx.com/');}
?>