PHP browser_detection() error

Status
Not open for further replies.

tcrow777

New Member
Messages
36
Reaction score
0
Points
0
Fatal error: Call to undefined function browser_detection() in /home/tcrow777/public_html/blog/wp-content/themes/disconnected-102/header.php on line 2
I cannot get this PHP browser detection script I wrote script to work. I have PHP basic.

Here is the code:
PHP:
<?php
if ( ( browser_detection( 'browser' ) == 'ie' ) 
&& 
( browser_detection( 'number' ) <= 6 ) )
{
header( 'Location: http://tcrow777.x10hosting.com/bad_explorer.html' ) ;
}
?>
The error is on http://tcrow777.x10hosting.com/blog/.

-Timothy
 

kajasweb

New Member
Messages
1,723
Reaction score
0
Points
0
I think, you haven't defined the Function or Included the file in which the function is defined.

Are you trying to use Browser_Detection Class? If so, please put those files in your account and include it before calling the function.
 
Last edited:

tcrow777

New Member
Messages
36
Reaction score
0
Points
0
I fixed it now, I was trying to use the script on http://techpatterns.com/downloads/php_browser_detection.php#php_full, I am using it now.

The new code is:
PHP:
<?php
include_once "browser_detection.php";
if ( ( browser_detection( 'browser' ) == 'ie' ) 
&& 
( browser_detection( 'number' ) <= 6 ) )
{
echo "<meta http-equiv='refresh' content='0;url=http://tcrow777.x10hosting.com/bad_explorer.html'>";
}
?>
I tried header() but it didn't work.

When IE 8 comes out I will change the script and opt-in to standards mode. I hate and will always hate IE.

-Timothy
 
Status
Not open for further replies.
Top