I am not a developer, I'm a designer. My point of perception is dramatically different from that of a developer. I can't create raw code, only replicate. The only way I can create something
unique in any sense is if I have two separate scripts and I have enough understanding to merge them together. That is how I am able to learn web development on my own. It's shallow but programming isn't one of my strengths, design is.
Read the code, understand the code, know what it does, then make use out of it.
It's the same thing with how I've thus far learned JavaScript only the scripts tend to be a little shorter thankfully due to the nature of clientside. For example I did this
Google Search to make reference to your post of course go figure such a query is not supported.
I still love learning but if you reply to one of my posts it helps to relate it to something I
already understand.

Merging this array with that script I realized after it did not work (as the other script on WebmasterWorld does) that I had to change the array reference to
$useragents['noajax']. If I leave Gecko as a value in the array it will tell me in Firefox that Ajax is not supported so this will effectively help me support browsers that AJAX is not supported in. Thanks for the continued help!
Code: Select all
<?php
$useragent = $_SERVER['HTTP_USER_AGENT'];
$useragents = array
(
'noajax' => array // $useragents['noajax']
(
'Opera/3',
'Opera 3', // Spoofing
'Opera/4',
'Opera 4', // Spoofing
'Opera/5',
'Opera 5', // Spoofing
'Opera/6',
'Opera 6', // Spoofing
'Opera/7',
'Opera 7', // Spoofing
'Opera/8.00',
'Opera 8.00', // Spoofing
'Opera/8.01',
'Opera 8.01', // Spoofing
),
);
$checkit = '';
$answer = '';
foreach ($useragents['noajax'] as $ua) {
$checkit = stristr($useragent,$ua);
if ($checkit === false) {
$answer = false;
} else {
$answer = true;
break;
}
}
if ($answer) {
echo 'Your browser does <b>not</b> support AJAX, falling back...';
} else {
echo 'Your browser supports AJAX.';
}
?>