Re: Creating a home screen "web app" for smart phone

From: Date: Fri, 24 Apr 2020 19:10:17 +0000
Subject: Re: Creating a home screen "web app" for smart phone
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-327107@lists.php.net to get a copy of this message
What you want to research are progressive web applications. There are a number of different technologies and browser features related to this topic. The short of it is you convert your PHP to a REST API back end (or similar) and communicate with it using a single page application on the front end. On Fri, Apr 24, 2020, 10:31 <mbox@s22.us> wrote: > I’ve written a PHP script that is served from my host's server > that I can access from my computer and/or my phone in a browser. > Everything works perfectly. > > There is a feature on the iPhone (apparently there’s something > similar on Android, too) where I can add the script to the home screen so > it functions like an app. Very nice. However, as soon as I click a link > to go to any other page of my script, the new page opens in Safari and I > lose the full screen goodness of the web app. > > So I thought I should change the script from multiple pages to a > single page, and just change the content on the main page. However, I > can’t figure out how to make that work. I've tried creating a session and > loading each “page” by changing a $_SESSION[‘page’] variable, but the > session variable doesn’t appear to be global, or I’m doing it wrong. I > echo’d that var both before the $content and again afterwards, and only the > 2nd one changes - not the first one - so, of course, the content doesn’t > change. > > Is there a way to do what I’m trying to do? Or am I going about > it the wrong way? How can I make this script work as a web app on my phone? > > Thanks, > Frank

« previous php.general (#327107) next »