Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Create a desktop application using PHP

I have a PHP/MySQL powered SaaS application which I want to deploy an offline version of. I don't want to use any of the numerous PHP GUI tools that are out there, as this would require rebuilding the GUI and I want it to look exactly the same as the web version.

I want to run Apache/MySQL servers (or something similar) on the clients' systems and somehow compile the PHP code so the source code isn't visible. What is the best way of doing this? Ideally I want to have one .exe file that would start/stop the server.

The following is a very similar question, but it is related to Python and not PHP: Create application for web & desktop

like image 950
Ingmaras Keleras Avatar asked Jan 01 '13 21:01

Ingmaras Keleras


People also ask

Can you make a desktop app with PHP?

PHP Desktop is an open source project founded by Czarek Tomczak in 2012 to provide a way for developing native desktop GUI applications using web technologies such as PHP, HTML5, JavaScript and SQLite. Think of it as Electron for PHP.

Can we make EXE file in PHP?

Run Phpdesktopchrome.exe, it will execute like a browser with PHP compiler. Download Innosetup Software for make exe file. Install and run Innosetup and select Phpdesktop chrome files to create a EXE file in Option. Install wampserver in client system with database import.

How do I create a desktop web application?

Navigate to the website that you want to make an app for, then navigate to the specific page that you want to use for the app. Now, click the menu button (three dots) in the top-right corner of the window and select Apps > Install this site as an app. Type a name for your new app, then click “Install.”


1 Answers

You can "hide" the source code by creating a compressed phar archive.

As webserver you can use PHP's built in webserver.

As an offline database, normally sqlite is fitting, if you need Mysql, there is an embedded version of Mysql available as well so you can embed that as well, probably through a PHP C extension.

like image 89
hakre Avatar answered Oct 21 '22 06:10

hakre