Sign up ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free.

I have to develop a real estate marketing CRM software for my client - where the application is installed on desktop but can also be accessed from web.

2 reasons why they want the application to run from desktop :

  1. So that it can work with/without internet connection
  2. They don't want their complete data to be online

They want to access few of the data like property listing & inquiries (managed from desktop application) from their website through secure login & password.

The data that is entered in desktop application should be automatically synchronized with the website application. I was wondering if there is a way to develop this kind of software using PHP & MySQL. If yes, it will be great if anyone can provide me the referral link.Else please suggest, which language should I use.

share|improve this question
I've been working on PHP Desktop that embeds IE browser control and php webserver so you can create desktop application using the same php code, but this project is incomplete. I only know of one other solution, but it is a commercial application called Exe Output, allows you to embed IE or Chrome browser and a php server. – Czarek Tomczak Nov 23 '12 at 21:19
The data that is entered in desktop application should be automatically synchronized with the website application. If it's offline then the "automatic synchronization" needs to have some window or times that it can occur, also if it's a 100% offline desktop application, how do you plan to handle the scenario where someone has no internet access ever? Also how do you plan to deal with the merging of changes from web and desktop which conflict during that synchronization? This is a complex problem and it sounds like you need to do a lot more study. Also there's no clear question here. – Jimmy Hoffa Nov 23 '12 at 21:22
Have a look at PHP Desktop that embeds php web-server and IE engine turning php scripts into native application. – Czarek Tomczak Jan 13 '13 at 4:13
@JimmyHoffa if someone has no internet access ever they are effectively not using the same program as everyone else. – Brad Apr 30 '13 at 20:28
TideSDK would be good option. They provide better support. – Hardik Thaker Jun 11 '13 at 11:24

9 Answers 9

There is a way, yes, using a binding to a GUI library like PHP/Gtk. But I don't advise that.

Instead, use a language like C#, VB.Net, Delphi, Lazarus, or Python to create the desktop app. Their support for desktop applications is much more mature. The results will be far better, and you'll have fewer headaches from the experience. Don't try to force the square PHP peg into the round desktop hole.

If what you are really asking is if you can create desktop software with web technologies, then yes that is possible. Look at tools such as nwjs (was node-webkit), with which you can create desktop apps using HTML & JavaScript. In such an application, no webserver would be required - though it can certainly talk to a web server on which a PHP app was running if needed.

share|improve this answer
is PHP/GTK even still maintained / binary distributed? Also there is PHP/QT, but AFAIR it's quite unstable. – ZJR Nov 24 '12 at 2:40
It was nice you put the link of nwjs as you mention it – Ahmad Jun 4 at 5:42

Sounds kind of crude, but just export your data as a Spreadsheet. And let them play with the spreadsheet on their desktops. You could go mad and have the web server upload a modified spreadsheet and apply any updates to the central DB.

Obviously this is very error prone and clunky, BUT, so is any other offline replication solution. At least the users will be aware of the obvious problems. Any other solution will have the same underlying problems but a slicker interface will give a false sense of security.

share|improve this answer

Nightrain - PHP Desktop Packager might be what you are looking for. Nightrain does not include MySQL but you can install it on the user's computer or you can just update your application to use SQLite Database. For your these particular requirements switching to SQLite database might be better.

Here's what you have to do:

  1. Download Nightrain from:
  2. Copy your application to the /www folder
  3. Run the nightrain executable to launch your application, test it out or do whatever adjustments you have to
share|improve this answer

A possibility could be to develop the application as a web application and run your web server on your desktop. In this way you do not need a different technology.

EDIT: there exist portable web server solutions (for example, or, which make this approach work much more smooth.

share|improve this answer
This was my first thought, also. – Carson63000 Nov 23 '12 at 22:46
Security issues in this setup will have to be considered, though probably this is an intranet and a limited scope application, so I bless the attempt, just take care. If targeting windows you may have also give a look to this obscure MS technology: .hta – ZJR Nov 24 '12 at 1:47

Yes its possible php gtk project is no longer active, with the power of php 5.4 there is a better platform called wxphp something based on popular wxWidget, give a try I think you'll not disappointed

Here's why:

  • Its build over most popular wxWidget
  • Compatible with Windows, Mac, Linux/Ubuntu GUI platforms
  • wxWidget Always use native GUI
  • wxWidget still under active development

For more about wxWidget visit here wxWidget

share|improve this answer

It's possible, but it's rarely done. PHP was designed as a language for generating HTML and its functions aren't helpful in desktop applications.

Things will be easier if you learn another language.

PHP-GTK, PHP-QT, and PHP-Wx exist but don't have any significant community. Trying to make a deployable app will be difficult.

share|improve this answer

When all you have is a hammer...

In theory, yes. In practice I wouldn't.

There is a PHP-GTK extension that allows you to build GUI applications on top of PHP (though I've never used it).

However, PHP is not intended for building GUI apps and its architecture isn't conducive to such projects. PHP is built to handle short-lived request/response application models and that's what it does best.

You should pick tools appropriate to the job you're doing rather than trying to force a given tool you're familiar with into a role it's not made for. The result will never be anywhere near optimal if you do.

There are plenty of other languages that provide the functionality you need to build a CRM application, java, C#, C++ and a whole slew of other tools. They're also better suited to building GUI applications than PHP is. I'd seriously consider looking at one of those instead.

share|improve this answer

Here are two possible approaches I would take:

  1. You could try Appcelerator Titanium for Desktop development with PHP.

  2. Alternatively, you could install a local web server, develop the application logic, create a web-service and develop the view logic in something like Java to interface with the web-service.

If you take the second approach, I'd recommend you to use REST as the type of web-service.

share|improve this answer

PHP-GTK is an extension for the PHP programming language that implements language bindings for GTK+. It provides an object-oriented interface to GTK+ classes and functions and greatly simplifies writing client-side cross-platform GUI applications.

GTK+ is a multi-platform toolkit for creating graphical user interfaces. Offering a complete set of widgets, GTK+ is suitable for projects ranging from small one-off tools to complete application suites.

share|improve this answer
That link is often referred to, but has anyone heard of one app made with php-gtk? Just one? Even a bad one? I mean even their own list of application ( is totally and utterly empty. I don't mean to say php-gtk is a stalled, or unuseful project (never used it). But I'd wager it doesn't have very good support, and not much community help. – Xananax Jun 20 '11 at 17:23
I think using something such as air or appcelerator titanium fits the bill better (although I haven't tried it yet either). – Xananax Jun 20 '11 at 17:24
-1 PHP GTK was dead, long before you answered the question. @Xananax Titanium is a good alternative, but it's still not there yet. – Yannis Dec 29 '11 at 13:07
Yup, I have tried it since then, but there are a lot of bugs and missing docs (no bashing of titanium intended, the eclipse-based IDE is very cool, but it still needs a lot). Air is proprietary and dev is hard under linux. I am exploring the possibility of building my own wrapper around webkit through QT. – Xananax Dec 29 '11 at 14:11

protected by gnat Jun 4 at 4:38

Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.