Frequently asked questions

How do I make this work on my HTML pages?

Problem
HTML is code the end user's browser will process and PHP is something that the webserver will process, including PHP in HTML pages isn't going to work and will just show the function in the page unless the server is instructed otherwise.

Solution
Assuming you're hosting in an Linux environment you can add the following to your .htaccess file which will instruct the server to execute PHP inside HTML and HTM pages.

AddType application/x-httpd-php .html AddType application/x-httpd-php .htm AddHandler x-httpd-php .html .htm .cgi .php

Your webhost will need support for PHP and .htaccess - please contact your host direct to address these issues.


Can I use this code on a commercial site?

Yes, you are welcome to use this code on your commercial website.


Can I use this code on all my sites?

Each domain name needs a License.


How do I know it works?

Easy, make sure you use FireFox and a pretty smart extension!


How are search engines treaded?

If they spider as a mobile they see the mobile version - this is the right thing to do.

Naturally there is a lot of concern about duplicate content and search engines, there is nothing to worry about. If Google visits your website with a user agent of a Nokia, and it will! It is the right thing to detect that they are a mobile to serve or redirect them to the right content.

They will be more likely to view you as a nice responsible web publisher who thinks of other formats and devices. That has to be a good thing. I have never had any report of ill effect with search engines from anyone using this code.


Do you have a developer license?

Yes, please sign up for our enterprise license.


Will this slow my site down?

No, this will not slow your site down.


Why do I get an infinite redirect?

Check how you call the function.

It is common for people to redirect mobile browsers to the mobile site then when the device hits the mobile site it fails or starts an infinite redirect. If this happens make sure your mobile site is not detecting mobiles and sending them back to itself. Your mobile site should use the function to detect PC browsers then redirect them to the full site.