Find Jobs
Hire Freelancers

566994 Set Simple Cookie php script

N/A

Completed
Posted almost 12 years ago

N/A

Paid on delivery
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
Project ID: 2312957

About the project

1 proposal
Remote project
Active 12 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
Awarded to:
User Avatar
Hello Jaime, I'm ready to help. Please see the PMB for more info. Thank you! Ilshat
$10 USD in 0 day
5.0 (63 reviews)
4.6
4.6

About the client

Flag of UNITED STATES
San Diego, United States
5.0
14
Payment method verified
Member since Oct 11, 2005

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.