38 comments found

  • Bought between 1 and 9 items
  • Has been a member for 1-2 years
tagonic Purchased

Excellent. Both the product and the support has been exceptional. Thank you very much. I have no doubt we’ll be requesting your services again in the future.

smart_techie

Thank you :)

  • Bought between 50 and 99 items
  • Has been a member for 2-3 years

Works on HTML page?

smart_techie
Yes, but you need to have htaccess support enabled from your hosting company, please read through the FAQ page http://codecanyon.net/item/mobile-sniffer-pro-detection-redirection-tool/2646620/faqs
  • Bought between 100 and 499 items
  • Has been a member for 4-5 years
berniecla Purchased

Hi…nice work. Could you explain more in detail how to implement this for me: -my main website is done in Flash, index.html is loading page -my mobile website is done in wordpress/php based

the explanation in FAQ is very basic. Thanks!

smart_techie

Configuration of the plugin could be found in the documentation included. Once configured, in order to use PHP in the HTML file, you need to do the changes as in the FAQ.

Create a .htaccess file with the following inside
RewriteEngine On
RewriteRule ^index.html /index.php [L]

Rename the index.html to index.php

P.S. Please make sure the you have .htaccess support in your server. Other wise you would be required to change the html file to php file on your code as well. P.M me if you are still unclear.

  • Bought between 50 and 99 items
  • Has been a member for 4-5 years

Hi tried the install.php and install.php and its not creating a config file also your support site is down. How can I get in touch? Thanks

smart_techie

Hello, Thank you for the purchase. If you its not creating the config.php file, its probably because the file is not writable in server (you can change the file permissions to 777).

The other thing you can do is, copy the generated code and replace the existing contents of config.php file.

Hope this helps & sorry about the support site, it is expected to be up shortly.

  • Bought between 50 and 99 items
  • Has been a member for 4-5 years

update: I got the config file to work and the site redirect to my mobile site but not to the index (home page) as I had set. Maybe this is an error with .htaccess

however after a few more tests I got this error on the mobile site Warning: Cannot modify header information – headers already sent by (output started at /home/content/90/9809890/html/index.php:7) in /home/content/90/9809890/html/sniffer/MobileSniff.php on line 298

Warning: Cannot modify header information – headers already sent by (output started at /home/content/90/9809890/html/index.php:7) in /home/content/90/9809890/html/sniffer/MobileSniff.php on line 212

smart_techie

What version of PHP are you in ? Try using ob_start() at the beginning of the script. If you are not able to fix it, PM me any temp FTP details, I will set it up for you free of cost..

smart_techie

Adding to the point, in your index.php file make sure that the first thing you have is the MobileSniffer script and you don’t have any whitespace at the beginning. Hope this helps.

Default-user

I am using PHP 5.3. When you say place ob_start() at the beginning of the script. You mean in the first line of MobileSniff.php ?

smart_techie

5.3 should be pretty good, I meant the index.php file.. The best way is to eliminate any white spaces at the beginning.

Default-user

Sorry for not getting back. Just realised the problem was that we are trying to install on a wordpress site. Any recomendations on how to install for this.

Also is there a way of not redirecting tablets?

Thanks

smart_techie

You can do it on the main index.php file. But please be aware that this is not a plug and play plugin for wordpress, you would have to configure like how you would for any regular site..

  • Bought between 1 and 9 items
  • Has been a member for 5-6 years
mattyt81 Purchased

Hi

I have the script redirecting mobile users to my .mobi site from my .co.uk, however when my mobile website loads it seems to be still using some of the CSS from the desktop site. When I refresh the browser on my mobile site, it only then appears all correctly and using the correct CSS.

Would you know why this is happening?

smart_techie

If you are using .htaccess check if you are setting any cache headers, seems very much like cache issue,

Default-user
mattyt81 Purchased

Hi, I am not using .htaccess, if you want to see what going on, if you go to www.fitnetwork.co.uk you will get redirected to my mobile site, which will look distorted, then if you refresh you browser on you phone you will see how the site should look

smart_techie

Tested it with a Win8 Phone – IE10 browser, the site seems to be the same even after several refreshes, looks perfectly fine.. May be you should try refreshing the browser cache and check it freshly..

Default-user
mattyt81 Purchased

Hi, yes I managed to fix it yesterday, so its not working, cheers

smart_techie

Good to know.. :)

  • Bought between 10 and 49 items
  • Has been a member for 6-7 years
kellyrnh Purchased

Hi,

I am having the same issue as tinsterman. I tried your suggestions, and there were big errors on my site so I had to remove the script. Any advice is really appreciated!!!

Thanks!

smart_techie

Can you tell me what kind of errors are your getting, that would really help me identify whats wrong.

Default-user
kellyrnh Purchased

Hi, I just sent you a message, I’d like to send you a screenshot since I took the sniffer out of my site. Thanks!

  • Bought between 100 and 499 items
  • Has been a member for 2-3 years
GillesC Purchased

Hi I want to redirect depending of the screen size, I used this code MobileSniffer::Sniff(); echo “Your screen resolution is ” . MobileSniffer::get(Sniff::SCREEN_WIDTH) . “x” . MobileSniffer::get(Sniff::SCREEN_HEIGHT) . ” px”; But i can’t get the value only the text, I have no error. In the header i just have this include : include_once ‘class/sniffer/MobileSniff.php’; did i missed something ? thanks

smart_techie

Are you able to see anything like “Please wait… Redirecting you to Mobile site…”

GillesC
GillesC Purchased

No I just tried to get the value first, but all I have is “Your screen resolution is x px”, no value are shown.

smart_techie

can you PM me your config file ?

GillesC
GillesC Purchased

define(“MODE_DUAL”, 0); define(“MODE_DIRECTORY”, 1); define(“MODE_DOMAIN”, 2);

define(“SWITCH_SAME_URL”, 3); define(“SWITCH_ROOT”, 4);

$setting“redir” = MODE_DIRECTORY; $setting“redir” = SWITCH_ROOT; $setting“redir” = “Please wait… Redirecting you to Mobile site…”; $setting“sniff” = true; $setting“sniff” = false; $setting“mobile”[“path”] = “http://m.example.com”; $setting“mobile” = ”/var/www/html/itsmylab/dual/mobile”; $setting“desktop”[“path”] = “http://www.XXX.com/”; $setting“desktop” = ”/tracking_login.php”; // This can be used in MODE_DOMAIN as well $setting“mobile” = ”/app”; // This can be used in MODE_DOMAIN as well $setting“path” = ’/class/sniffer/’; // Assuming that you have placed the folder like http://www.example.com/sniffer/

$setting“override” = “site”; $setting“override” = “desktop”; $setting“override” = “mobile”;

smart_techie

I’m not sure if the CodeCanyon comment system has to do anything with this – But I notice this two times

$setting“sniff” = true; 
$setting“sniff” = false; 

sniff should be set to true

GillesC
GillesC Purchased

it come from codecanyon and the copy, it’s not like this in the file There it is without the brackets $setting-sniff-once- = true; $setting-sniff-client_profile = false;

smart_techie

you need to set the sniff-client profile = true;

GillesC
GillesC Purchased

Ok, it’s working great thanks

smart_techie

Thanks, please rate the script if you liked it & the support

GillesC
GillesC Purchased

it’s already done : 5 stars

smart_techie

Thank you…

  • Bought between 10 and 49 items
  • Has been a member for 2-3 years

I am stuck. I know I’m missing something but not sure where.

my config.php
<?php
define("MODE_DUAL", 0);
define("MODE_DIRECTORY", 1);
define("MODE_DOMAIN", 2);
define("SWITCH_SAME_URL", 3);
define("SWITCH_ROOT", 4);
$setting["redir"]["type"] = MODE_DUAL;
$setting["redir"]["switch_type"] = SWITCH_ROOT;
$setting["redir"]["message"] = "Please wait...";
$setting["sniff"]["once"] = true;
$setting["sniff"]["client_profile"] = false;
$setting["mobile"]["domain"]["path"] = "";
$setting["mobile"]["directory"] = "/public_html/mydomainname/";
$setting["desktop"]["domain"]["path"] = "";
$setting["desktop"]["root"] = "";
$setting["mobile"]["root"] = "";
$setting["path"]["plugin"] = "/sniffer/"; 
$setting["override"]["variable"] = "site";
$setting["override"]["desktop"] = "desktop";
$setting["override"]["mobile"] = "mobile";
?>
In the php header file of my website:
<?php
ini_set('display_errors', 1);
include_once 'sniffer/MobileSniff.php';

MobileSniffer::Sniff();

if (MobileSniffer::isDevice(Device::Android))
    header("Location: ../android/");
elseif (MobileSniffer::isDevice(Device::iPhone))
    header("Location: ../iphone/");
elseif (MobileSniffer::isDevice(Device::iPad))
    header("Location: ../ipad/");
elseif (MobileSniffer::isDevice(Device::iPod))
    header("Location: ../ipod/");
?>

All works fine ==> EXCEPT when I click on the link “desktop Version” in the iPhone index.php file,

Change to Desktop version of the site

It goes to http://www.mydomainname.com/iphone/?site=desktop

If I change the above to it redirects again to http://www.mydomainname.com/ihone/

What am I doing wrong?

smart_techie

Your config file is wrong, please use the config generation tool to assist you. If not, PM me, I will get back to you ASAP.

  • Bought between 10 and 49 items
  • Has been a member for 2-3 years

Follow up to my previous post – I hope some-one can assist me that’s familiar with this script.

My objective is this. When a user ends up on our website when using their iPhone, the user is re-directed to a page that states there is an app available. The user can then select on that page wether they want to download the app or a “no thanks” link that will bring them back to the website page.

Everything works except the no thanks link, because the home page keeps re-directing the user to the iPhone page. Anyone any thoughts on this?

smart_techie

From the looks of the config file, you are on a DUAL REDIRECT mode but you are trying to achieve a redirect. If so, the config is set wrong. PM me with your site link, I will check it out what is wrong. Sorry for the delay in response.

Default-user

not able to pm you – at least I don’t know how.

  • Bought between 50 and 99 items
  • Has been a member for 4-5 years

Hello! I’ve open my server error logs and there are many errors like this:

[06-Jun-2013 00:52:38 Europe/Rome] PHP Warning: file_get_contents(http://www.useragentstring.com/?uas=Mozilla%2F5.0+%28Macintosh%3B+Intel+Mac+OS+X+10_8_3%29+AppleWebKit%2F536.28.10+%28KHTML%2C+like+Gecko%29+Version%2F6.0.3+Safari%2F536.28.10&getJSON=all): failed to open stream: no suitable wrapper could be found in /home/xxxxxxxxxx/sniffer/MobileSniff.php on line 118

smart_techie

You can add a @ in front of the code – @file_get_contents(....) – It’s just a warning, this shouldn’t affect the core functionality.

  • Bought between 10 and 49 items
  • Has been a member for 2-3 years
usvi4me Purchased

If anyone is familiar with this code and is a freelancer, here’s a job involving sniffer.

https://www.freelancer.com/projects/Javascript-Website-Design/Mobile-device-notifications.html
smart_techie

Do you have htaccess support on your server? Can you PM me the site link where you are planning to implement this feature?

  • Bought between 1 and 9 items
  • Has been a member for 0-1 years

Hello, Im looking for a re-direct script that will re-direct my website visitor when a smartphone device is detected BUT not when a tablet is used – for example, I want redirection if an iPhone is used but NOT when an iPad is used.

Can this be achieved with this script?

smart_techie

Yes it is perfectly possible. There have been many such use cases on this by those who have purchased. So yes, you can redirect only for a mobile & not a tablet.

  • Bought between 10 and 49 items
  • Has been a member for 2-3 years
  • Netherlands

Hi smart techie, thanks for the great code. It works!!!! changed my index.html to index.php and made a .htacces file. I like to redirect phones to http://www.ivomostertmandirector.com/quicklook.html and tablets to http://www.ivomostertmandirector.com How do I do that? Do I need to add some code in the config.php?

smart_techie

Thank you for purchasing,

If you take a look at the FAQ section there is something related to that. Basically you can use something like this. Config file needs changes when you want the sniffer to detect & work automatically. Since your case is not that, you can leave the config file untouched – take a look at the sample code below.

if(MobileSniffer::isRequestForMobile()){
    if(!MobileSniffer::isTablet()){
         // Redirect to tablet ;
    }else{ 
        // redirect to mobile... 
    }
}

Let me know if this helped.

FreshDesignElements

Great thanks. Is this good?

if(MobileSniffer::isRequestForMobile()){
   if(!MobileSniffer::isTablet()){
        // Redirect to tablet ; http://www.ivomostertmandirector.com
   }else{ 
       // redirect to mobile ; http://www.ivomostertmandirector.com/quicklook.html 
   }
}

and where do I place this code?

smart_techie

No, // Redirect to tablet was just a comment, you need to include the actual redirection code there.

header("Location: http://www.ivomostertmandirector.com");

And the code needs to go to the very top of the right after the sniffer gets included into the page.

FreshDesignElements

Sorry, I’m not a code guy.

Okay, so this goes right after the head tag in my index.

<?php include_once '/WWW/B/.5c1/m/mosterti/htdocs/intro/sniffer/MobileSniff.php'; MobileSniffer::redirectByPreference();?> if(MobileSniffer::isRequestForMobile()){ if(!MobileSniffer::isTablet()){ header("Location: http://www.ivomostertmandirector.com"); }else{ header("Location: http://www.ivomostertmandirector.com/quicklook.html"); } }
smart_techie

no worries.. here is the refined code

<?php
 require_once '/WWW/B/.5c1/m/mosterti/htdocs/intro/sniffer/MobileSniff.php';

if(MobileSniffer::isRequestForMobile()){
   if(!MobileSniffer::isTablet()){
        header("Location: http://www.ivomostertmandirector.com ");
   }else{
        header("Location: http://www.ivomostertmandirector.com/quicklook.html ");
   exit;
   }
}
?>
FreshDesignElements

GREAT! You are the best!

smart_techie

Thank you, Please do leave me a rating :)

FreshDesignElements

A did yesterday. Top stars!

smart_techie

Thank you!

FreshDesignElements
Hi smart techie, I dont know why but it does’t work. Should the code be followed by MobileSniffer::redirectByPreference();?> I’ve tried with and without. This is the test URL: http://www.ivomostertman.com/intro/index.php
smart_techie

If you are using automatic redirection you should set up the config file. But it seems to be working, check this one out, the desktop link gets redirected to the mobile site…

http://www.ivomostertman.com/intro/index.php?site=mobile
FreshDesignElements

Now I’m totally confused.

My config file looks like this:

<?php

define("MODE_DUAL", 0);
define("MODE_DIRECTORY", 1);
define("MODE_DOMAIN", 2);
define("SWITCH_SAME_URL", 3);
define("SWITCH_ROOT", 4);

$setting["redir"]["type"] = MODE_DIRECTORY;
$setting["redir"]["switch_type"] = SWITCH_ROOT;

$setting["redir"]["message"] = "Please wait... Redirecting you to Mobile site...";
$setting["sniff"]["once"] = true;
$setting["sniff"]["client_profile"] = false;

$setting["mobile"]["domain"]["path"] = "";

$setting["mobile"]["directory"] = "/var/www/html/itsmylab/dual/mobile";

$setting["desktop"]["domain"]["path"] = "http://www.ivomostertman.com/intro";
$setting["desktop"]["root"] = "/";
$setting["mobile"]["root"] = "http://www.ivomostertmandirector.com";

$setting["path"]["plugin"] = "/sniffer/"; 

$setting["override"]["variable"] = "site";
$setting["override"]["desktop"] = "desktop";
$setting["override"]["mobile"] = "mobile";

?>

It directs every mobile device to http://www.ivomostertmandirector.com

The head part of my index.php (renamed index.html) looks like this:

<?php
 require_once '/WWW/B/.5c1/m/mosterti/htdocs/intro/sniffer/MobileSniff.php';

if(MobileSniffer::isRequestForMobile()){
   if(!MobileSniffer::isTablet()){
        header("Location: http://www.ivomostertmandirector.com ");
   }else{
        header("Location: http://www.ivomostertman.com/mobile/ ");
   exit;
   }
}
?>
MobileSniffer::redirectByPreference();?>

What do I need to do to have phones go to http://www.ivomostertman.com/mobile/ and tablets go to http://www.ivomostertmandirector.com ?

Thanks for your patience.

smart_techie
Ok, I thought you second query was for a second implementation. In your above case the last line is not required..
MobileSniffer::redirectByPreference();?>
And the config.php doesn’t matter in this sense because when you use MobileSniffer::redirectByPreference(); it uses the config file to determine where to redirect. But since in your case you are manually redirecting using
header("Location: http://www.ivomostertmandirector.com ");
configuration isn’t necessary.

So in non-technical terms, simply remove the last line

MobileSniffer::redirectByPreference();?>

and you should be good to go.
FreshDesignElements

I’ve deleted the last line but it still did not work. Than I switched the 2 url’s and it works fine. So if(!MobileSniffer::isTablet()){ does what “mobile” should do. How is that possible?

smart_techie

Remove the ! mark in the code, you don’t require to switch the URLs’ in that case

!MobileSniffer::isTablet()

should be

MobileSniffer::isTablet()

! means NOT

FreshDesignElements

Aaahh. I get it. Thanks for your support. You are the best!

  • Bought between 500 and 999 items
  • Chile
  • Has been a member for 4-5 years

Hello my friend, works in worpress? sorry for my bad english

smart_techie

It’s not a wordpress plugin, but you can modify to use it in wordpress.

  • Bought between 50 and 99 items
  • Has been a member for 3-4 years

Hi, please can you tell me if I can redirect my website to a mobile site that is on another server with a different domain name?

Thanks.

smart_techie

Yes ideally it should work.

Default-user

Ok, which operation mode should I choose ?

smart_techie

Sub domain mode would work for this situation

smart_techie

Any luck? Let me know if I can help…

  • Bought between 10 and 49 items
  • Has been a member for 2-3 years

Hi there,

I’m looking for a script doing the following:

In Wordpress I set up pages with galleries as sliders for desktop sites.

For mobile devices I duplicated the galleries and, instead of having a slider, just put the pictures one after another on a scrollable page. The page has the same name than the original desktop version, just with a preposed “mobile_”.

Is it possible to only redirect mobile devices for specific gallery sites and leave all the other content like it is without any redirection (because it is respondable)?

Thank you!

smart_techie

Hi,

Yes it is possible to do with this plugin, but the plugin is not ready for wordpress out of the box & would require some extra work for it. It is even possible to redirect different pages based on different devices. Let me know if I can help you in anyway.

  • Bought between 50 and 99 items
  • Has been a member for 2-3 years
Can you please turn on your mobile demo site http://demo.itsmylab.com/Mobile-Sniffer/sniffer/install/ ?
by
by
by
by
by
by