I have a project using WAMP/EasyPHP and I want to produce it to my client as a standalone app so that he just needs one click to access the web page locally instead of running the WAMP/EasyPHP server and typing the IP address in the address bar etc. I hava Googled and found many solutions like phpdesktop, nightrain etc, but I want to use my existing technologies as well as my code. I want to know whether is it possible to create an executable which serves as an icon and upon clicking which starts the server(WAMP or so) and also instantly evokes the browser to fetch the URL of my application.
It sounds like you would be better off making a website here, that is what PHP is best at after all. If you have not already I suggest picking up a background text such as this one: http://shop.oreilly.com/product/9780596157142.do to give you the basic knowledge but it should basically be a case of getting a hosting package, uploading your files and your database. Then you just need to add authentication so that only your client can see the website.
However if you have your heart set on a desktop app, I suggest: http://www.tidesdk.org/ it will be a more complex solution but allow you to build an app along the lines outlined here, just bear in mind that the first option is probably easier than this.
Related
I manage a website. Let's name it Website A. Website A is written in PHP, procedural-style, with a few different and out-dated frameworks in it. No surprise, it is a mess to maintain and to upgrade. I want to create Website B with a clean framework (Symfony2) and using OOP. Slowly I will refactor Website A into Website B. Any new features will also be done in Website B.
The catch? I want content from Website A to appear in the layout of Website B. I can't simply include the files of Website A in Website B as the configuration of it messes with the framework of Website B. What's the best way to achieve it? Using an iframe? Using Curl? Or using another method?
When I tried using AJAX, the integration went smoothly. Since they're on the same domain the cookies are shared, so even if the user logs in on Website B, Website A is aware of it. It was, however, slow to output and I had problems with the responsive design (even though I know responsive iframe can be done).
When using Curl, it was much faster to output and no responsive problems. However, since it's PHP that connects to Website A, I need to find a way to pass the authentication from one Website to another.
Both methods need some work in order to function properly. I lean toward the curl method, but is there a "best practice" in my case?
Both websites has personalized content, it's not simply a firewall-type authentification.
I'm not sure whether you're authentication involves personalised content, which would be harder, or just firewalled content. This would make a difference. The best approach I've seen to this problem was to use nginx as a reverse proxy.
I want to make a computer storage (online) Web Application with PHP/MySQL... I mean where we can keep all the data of computer and all its configuration, up-gradation, problem occured, solved problems and alerts for warranty expires..
Can any one give me the example link where i can gain some idea (The example can be on any platform). I just want to go thru its work-ability..
I gone thru google, but nothing worth..
This company does something like that in their software. It is called asset management. It appears to be done using PHP and Ajax as far as I can tell. I suggest researching Ajax for more info as you will need real-time tracking, i would think. http://www.dapperdesk.com/hd/logina.php
Here's a tricky one.
I'm developing a web app for iPads that will be installed as kiosks. The app is essentially a quiz. Wont need to store data in a database, but will need to process data from 1 page to another page (from questions page to results page).
Original solution was simple PHP. I have now been informed that wi-fi/3g will be unavailable to the kiosks, so they wont have access to the webserver w/ php that has been working like a charm. App needs to be browser-based.
Looked around for solutions for installing PHP on iPad, like PHPPOD from Cydia, but unsure if that is even an option for iPad...and we wont be jailbreaking them. Can this even be done w/o php?
If you won't be jailbreaking them, trying to get a working PHP interpreter on them might not be impossible, but it'll probably be at the very least annoyingly difficult (and it's unlikely Apple would approve random PHP interpreters in their app store).
I'd suggest trying to port the app to Javascript instead. If it's just a simple questions -> results flow, writing a basic Javascript web app with jQuery to help out if need be shouldn't be too painful.
If you're not jailbreaking them, then you will NOT be able to get any un-approved apps onto them. Apple does NOT want you to bypass the app store, because they want their 30% cut. Installing a PHP interpreter on an iphone/ipad would allow you to build apps outside of Apple's control - this is THE main reason why Flash will never been on an iphone - it's not just for playing movies, it's actually a pretty full runtime environment.
You could try using HTML5 local storage, or use the native SQLlite database in iOS.
Without wifi/3G you would need local storage won't you? For this you need not jailbreak your iPad & force it to work through PHP. You could do that following -
Jailbreak the app & maybe try to get your PHP solution working on iPad.
Build a native app with local storage (using sqlite or core data) & handle the display through UIWebView.
Build a HTML5 app with local storage is easy to do nowadays, again UIWebView would be used.
As Amber suggests, you could build all your quizzing logic in javascript, but I am concerned here as to where you'll store data. You need to refer to point 3.
Hope this helps...
I need some guidance around how to develop the app I'm working on.
It's basically a backend system to manage photos and slideshows (eg arrange photos in albums, decide which ones to publish, update names and captions etc)
I would like to avoid giving the source code to clients but would like to keep the actual photos and thumbnails on the client's server.
I'm not sure what would be the best way to achieve this. In my mind the steps are:
a) client uploads a photo to MY site
b) photo is registered into my DB
c) the original photo is moved to client's server
d) thumbnails are generated and saved on client's server
then the public site:
e) install the public website on my client's server;
f) when a user is browsing the client's website, the script gets the list of images to show from my database, and gets them from the local server.
(hope I made myself clear)
basically the question is: what's the best way to give the client minimal/no access to the source code?
I agree with benjy, however, you can get away with using an API to manage the system specific calls, and just have an upload handler that communicates back to your API on the clints box, so they still have some code, it is minimal, and the code requires an API call to function. That way you reduce the DB need, and reduce the resources required to manage the clients code.
API is used to authenticate / manage communication while the upload / manage scripts handle the upload/image handling.
IMO, this seems a little unnecessary. What exactly is your concern about having the source code rest on a client's server? All you need is a signed license agreement between you and the client preventing them from doing anything with it.
Or, if you really don't trust them, just sell it as hosted software. No point in the above procedure, which is rather convoluted (no offense), when you can just have everything on one server.
Just my $.02.
You can obfuscate the code with a commercial tool like IonCubelink text, or you can develop your application and license it using a SaaS model, and provide an API for the client software to use.
Zend Guard, SourceGuardian, IonCube, and similar are other viable options if you cannot keep it local but want to make it difficult to find out what the "source" is.
I have a two part question. The first I think I have an okay answer to....
I am looking to force an external program to be called up to view a configuration file for an application my company is working on. The basic gist I guess is to set the Content-type header to type that your application is associating with, and then serving the contents of the file. I was thinking its simply structured like this:
<?php
Header( "Content-type: application/blahtype" );
?>
output of xml configuration file goes here...
Any other best practices here? Obviously the user is going to have to allow the external application access to this file universally in all browsers, unless they have a plugin installed in their browser that will handle the content-type, like adobe pdf. This isn't viable for our company right now, so we're willing to live with the confirmation screen.
The second part of the question is a little bit more complex, I think. How do we detect if the user has the application installed, and if they do not, serve them different content (a sign up page, or the application executable itself)? I'm not wondering about the logistics of serving different content, but simply the detection process. Is it possible for an application to install a lifetime cookie in the browsers cache installed on the machine? That's not a perfect solution, because the user could clear their cache of course. How else can we accomplish this?
Examples of programs that do this are Amazon MP3 Downloader (I've actually gotten into a bad state with this once or twice), and iTunes U. You can see iTunes U example on Stanfords CS193P page here: http://www.stanford.edu/class/cs193p/cgi-bin/index.php
Much appreciate any advice,
Josh
For part 1 of your question, as long as your application is correctly registered to handle that MIME type, then, yes, the browser should [prompt the user and launch your application](http://msdn.microsoft.com/en-us/library/ms775148(VS.85).aspx "MSDN: Handling MIME Types in Internet Explorer").
An alternative approach would be a [protocol handler](http://msdn.microsoft.com/en-us/library/aa767914(VS.85).aspx "MSDN: Registering an Application to a URL Protocol"). Instead of registering a MIME type for your application, you register a “protocol” that goes in a URL, in place of the http://. If your protocol is called myapp, then you could create links like this:
Link
While you can only pass a small amount of information this way, you could pass a GUID or tag that the application, once launched, can use to retrieve the full document from your server.
Edit: For part 2 of your question, iTunes uses a plug-in. Looking at the code that’s used to redirect to iTunes, you’ll see something like this:
<Object id="iTunesDetector" height="1" classID="CLSID:D719897A-B07A-4C0C-AEA9-9B663A28DFCB" width="1"></Object>
It’s followed by some JavaScript to detect whether that plug-in was loaded. If it was, then iTunes must be installed and it launches iTunes using the itms: protocol (just like the myapp: protocol in the example above).
The problem here is, you would have to write a browser plug-in.
It may be a good idea to look into using browser extensions for things like this.