<script language="javascript" type="text/javascript">
<!--
//Browser Support Code
function ajaxFunction(){
var ajaxRequest; // The variable that makes Ajax possible!
try{
// Opera 8.0+, Firefox, Safari
ajaxRequest = new XMLHttpRequest();
} catch (e){
// Internet Explorer Browsers
try{
ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try{
ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");
} catch (e){
// Something went wrong
alert("Your browser broke!");
return false;
}
}
}
}
//-->
</script>
I found the code below to check if the browser supports Ajax [but it is javascript]
I would like to know if there is any PHP script doing the checking above and displaying a yes/no.
example:
Internet explorer 4.0
http:/myhost/check.php
output: ajax NOT supported
Internet explorer 7.0
http:/myhost/check.php
output: ajax supported
Thanks