Hello Scriptlancers!
This is going to be a breeze for those of you who are expert coders.
In fact, I know it will take a skilled coder only a couple of minutes to fix.
Here's the deal.
I have a simple re-direct script designed to detect if the visitor is a mobile browser, and if it is, then the visitor gets automatically re-directed to the mobile version of the site.
The only problem is that when the visitor wants to view the full site, it's not working properly.
The script on the header page simply creates a "session" and that session either expires quickly or the mobile browser doesn't carry that session to any additional pages.
So I'd like the script to set a cookie on the mobile phone instead.
When the visitor is at the mobile site, the link they'll click to back to the full site will have "?view=full" appended to the end of the link.
Then, when the main sites GETs that query string, it should create a cookie that tells the site to keep that visitor on the full site.
Here's the script as I currently have it:
if($_GET['view']=="full")
{
$_SESSION['full_view']="full";
}
include("[login to view URL]");
$detect = new Mobile_Detect();
if (($detect->isMobile())&&($_SESSION['full_view']=='')) {
// any mobile platform
header('Location: [login to view URL]');
exit();
}
I now understand that the top part should create the cookie that tells the script to keep the visitor in the full site instead of redirecting them to the MobileSite.
Anyway, Like I said, I know this will be as easy as cake for a skill coder and that's why I'm only willing to pay $10 max.
I thank you for your help and I value your consideration.
Sincerely,
Jaime