GetDotted Domains

Viewing Thread:
"Browser detection"

The "Freeola Customer Forum" forum, which includes Retro Game Reviews, has been archived and is now read-only. You cannot post here or create a new thread or review on this forum.

Thu 31/05/12 at 11:15
Regular
Posts: 2
Hi. I'm trying to implement a way of detecting what browser a viewer is using when looking at my web site. Ultimately I want to automatically send them to a 'mobile' version of my web site if it appears they are looking at the site on an Android or iPhone.

I currently use PHP quite extensively on my site so want to use PHP for this exercise as well. I have downloaded a file 'php_browscap.ini' and am trying to use this file in conjunction with PHP's 'get_browser()' function but apparently the PHP.ini file needs to point to the 'php_browscap.ini' file that I have uploaded to my htdocs folder. Obviously I can'y alter PHP.ini but is there a way I can somehow add htdocs/'php_browscap.ini' to the path that will allow 'get_browser()' to find it.

Or is there an easier and more accepted way of detecting a users browser?

Any assistance here would be much appreciated, many thanks.
Thu 09/08/12 at 10:39
Regular
Posts: 190
Hadnt seen that ! neither do my reviews show up from there site, but they do supply an easy way for people to review you unlike google where you have to have a google account to be able to review people and not that many people have an account out of the last 60-70 people we asked to do a review we have managed to only get 9 google reviews
Wed 08/08/12 at 16:38
Moderator
"Are you sure?"
Posts: 5,000
I notice that page isn't ranked by Google!

I would stay with Google's SEO info

[s]Hmmm...[/s]
Wed 08/08/12 at 16:25
Regular
Posts: 190
uk-local-search.co.uk/seo-your-website.aspx
Wed 08/08/12 at 12:12
Moderator
"Are you sure?"
Posts: 5,000
Hi Dograt,
Obviously don't believe everything (anything!) you hear on a sales call - especially if it's a cold call one :¬)

As you use an InstantPro site I'm afraid you won't be able to use the example I provided earlier.

Where did you read "Google SEO likes a site to have a mobile version" ? I've just had a quick skim read of Google's Webmaster Guidelines and didn't see any mention.

[s]Hmmm...[/s] My Freeola InstantPro Site
Wed 08/08/12 at 07:26
Regular
Posts: 190
Is this what the damn phone sales people are trying to sell me ? When they keep banging on about a mobile version of my website. I always wondered how it would redirect to the mobile version, apparently I read google seo likes a site to have a mobile version.
Sat 09/06/12 at 17:56
Moderator
"Are you sure?"
Posts: 5,000
No problem - always pleased to help :¬)


...and thanks for posting back as lots of people seem to disappear into the ether...


[s]Hmmm...[/s]
Thu 31/05/12 at 14:23
Regular
Posts: 2
Cool ;) Seems to work well, I shall give it a go. Many thanks for that, very much appreciated.
Thu 31/05/12 at 14:17
Moderator
"Are you sure?"
Posts: 5,000
Hi and welcome to the forums.

This isn't something I've had to do so far but thought it sounded worth investigating for the future...

Looking around there are numerous different ways to do this - but as you are using PHP I looked for a PHP solution to play with.

I've setup a demo page here:
www.hmmm.ip3.co.uk/mobile-test

If you are on a mobile device I redirect you to the BBC news mobile website, if you aren't on a mobile I don't redirect.

I'm using this PHP Mobile Detect script. It has quite a few options to play with - detecting device/OS/manufacturer/browser.

My page just uses this code snippet for my test:

<?php
include 'Mobile_Detect.php';
$detect = new Mobile_Detect;
if($detect->isMobile()){
header("Location: http://m.bbc.co.uk/news", true, 301);
}
?>


Note I changed the 301 redirection from the supplied example as I couldn't get their version to work!

I hope this helps - I might even use it myself one day :¬)
[s]Hmmm...[/s]
Thu 31/05/12 at 11:15
Regular
Posts: 2
Hi. I'm trying to implement a way of detecting what browser a viewer is using when looking at my web site. Ultimately I want to automatically send them to a 'mobile' version of my web site if it appears they are looking at the site on an Android or iPhone.

I currently use PHP quite extensively on my site so want to use PHP for this exercise as well. I have downloaded a file 'php_browscap.ini' and am trying to use this file in conjunction with PHP's 'get_browser()' function but apparently the PHP.ini file needs to point to the 'php_browscap.ini' file that I have uploaded to my htdocs folder. Obviously I can'y alter PHP.ini but is there a way I can somehow add htdocs/'php_browscap.ini' to the path that will allow 'get_browser()' to find it.

Or is there an easier and more accepted way of detecting a users browser?

Any assistance here would be much appreciated, many thanks.

Freeola & GetDotted are rated 5 Stars

Check out some of our customer reviews below:

Impressive control panel
I have to say that I'm impressed with the features available having logged on... Loads of info - excellent.
Phil
Simple, yet effective...
This is perfect, so simple yet effective, couldnt believe that I could build a web site, have alrealdy recommended you to friends. Brilliant.
Con

View More Reviews

Need some help? Give us a call on 01376 55 60 60

Go to Support Centre
Feedback Close Feedback

It appears you are using an old browser, as such, some parts of the Freeola and Getdotted site will not work as intended. Using the latest version of your browser, or another browser such as Google Chrome, Mozilla Firefox, or Opera will provide a better, safer browsing experience for you.