I have created a html page which sends custom data to a php file which then processes and evaluates it.
My next task is to make this into a GUI with the requirements:
1. A box for a custom search with button (it then posts this into the
php)
2. A box where xml/json request can be seen
3. A box where the xml/json response can be seen
4. A box where the parsed version is translated and made to look pretty.
***MUST CONNECT TO INTERNET, PHP ESTABLISHES CONNECTION BUT DO NOT WANT A GUI ISSUE
Any suggestions on programs or languages etc which can help me communicate with PHP in GUI form. It needs to be able to access the internet!
I was thinking perhaps Visual Basic as that's the only one I've ever used that really uses GUI's but I'm wondering what you all think!
Thanks!
Basically, what you're asking for is a web browser, with a very simple little HTML/Javascript front-end web page to make the PHP calls and display the results. I'm not entirely sure what it is about a browser environment that makes you think it's unsuitable, but it's basically exactly what you're asking for.
If a full-blown web browser really isn't suitable, you could try using a web browser control inside a simple GUI app. This would still work exactly the same, but would be without the browser controls, such as the URL bar.
Just use a browser.
If you don't want to do that -- build a browser.
If you are just looking for basically a web-based REST testing tool, try the Firefox RESTClient plug-in.
Why don't you use a framework ?
You may take a look here:
AppJS for Linux, Windows and Mac using HTML, CSS and Javascript
Adobe AIR : cross-platform using ActionScript/FLEX or HTML/Javascript
Titanium : HTML/CSS (no support anymore)
PhoneGap : mainly used for cross-phone-platform, but here's an Windows implementation of it (you should read the README.md ...)
You may also check this from Mozilla
Related
Not really a coding question exactly, and not sure which stack site to throw this on, so here goes.
Im wondering if there is any framework similar to appmobi/phonegap in the sense everything is sandboxed and compiled into an app format for both iphone and droids. Where the sandboxed server comes with the ability to run PHP on it, I've been tryin to search all day and I've come up with nothing as of yet other then heaps of articles on appmobi/phonegap. This could be a free or paid for framework (preferably free/open source).
If theres no frameworks like that then is there a means of taking something like apache itself that acts and runs like a webserver where I can load php into it, and at the end of my project compile it into one final package for use in the mobile markets?
The problem is that iOS generally uses Objective-C and the Android uses Java, but both can use javascript, which is why phonegap works.
So, unless you can write two webservers, one for iOS and one for Android, and port PHP to run under your webserver, or, more likely, write an interpreter that will take PHP and transform it to run on your webserver, then it would work.
But, if you write a mobile web application and use PHP as the code on the server, then you can send javascript and have that run in a browser on both devices.
The best option would be to have most of your business logic be in REST services that are written in PHP. You can do this in PhoneGap by following this blog:
http://share.ez.no/blogs/thiago-campos-viana/rest-api-basic-http-auth-and-phonegap-using-jquery
Here is the main part of the article though, so you can see how easy it can be.
//10.0.2.2:80 is the localhost in android emulator, app needs internet access
$.get("http://10.0.2.2:80/ez_site/api/ezp/content/node/2",
function(data) {
//code goes here
});
By doing this then you can have most of your business logic in PHP, and have just the UI be in javascript, able to take advantage of the hardware on the phones.
No. Attempting to include a web server and PHP runtime inside of a mobile application would have serious performance implications.
The reason PhoneGap works is because Javascript can execute natively in mobile applications by using the built-in web browser's rendering engine.
I am looking for a way to run an executable on the server and display its UI in the browser, so that the user can interact. Is it possible? If so, please suggest some ways of how I should do this.
I think that this will have something to do with Flash, Flex, ActiveX (choose which applicable), but I am not sure and that is why I am actually asking this question.
Before you ask, "What do I need this for?", I would like to create a simple Intranet website for my local network so that my relatives can use few applications from their browsers instead of network shares or remote desktop connections.
The website will be done in PHP and running on Apache.
Any ideas, people?
This is difficult because you cannot magically transform the UI of those applications to a UI that would render in a browser. Also, your Delphi applications likely dont have any entry points for handling HTTP based requests. Even if you could provide those via PHP you'd still have to delegate them to the executable then somehow, which means your Delphi app needs to provide the full functionality via a command line interface or similar means.
EDIT came across https://www.youtube.com/watch?v=AO-qca9ddqg. The video shows how to run applications built with a GTK3 UI, like GIMP, in the browser. The application itself is run and maintained completely on the server. PHP does have bindings for GTK though not for GTK3, so while it's not currently possible, it is in theory.
I am having an iPhone web app written in PHP and using the WebApp.Net framework. I would like to make this application work offline as well. As I understood I can not use the manifest tag of HTML5 because my files are PHP and not html. Or at least it didn't work with it and I don't know if I am in the right direction.
Does anyone have any idea for how can I do it?
Thanks
You can cache any static file, no matter how it is generated. You must cache via manifest all your html, javascript and css (and graphics also, if they are small). Use LocalStorage to store JSON requests needed in offline mode. Use online mode to synchronize data you work on into LocalStorage.
You haven't stated what is your application for and what should be done in offline mode, but generally the only way I see as for now is to fully AJAXise all functionality that will work in offline.
You can browse StackOverflow for tags html5+javascript for general discrussions, or html+javascript+mobile for more specific.
I have a simple php driven website running and I'm trying to figure out how it treats php pages. Some of my php documents are routing logic and some just includes for individual pages. How do i go about making this work offline?
What I though was that I'd have to re-create the routing logic in javascript. Is that my only option? In that case, is it even possible to have the site be driven by php while online and switch to JS offline? I can't make sense of it.
If your site is fairly static, HTML5's cache manifest may get you most of the way there. Have PHP output a cache.manifest file in the correct format with all your routing system's URLs and those URLs will be stored locally in a compliant browser. Attempting to access them will pull them out of the cache if possible.
If you're looking for something more dynamic, though, you're going to have to do more legwork.
Here's some good info on offline caching.
It is important to remember that PHP is processed on the server. The result of your PHP code is all that is sent to your browser. Your browser has absolutely no knowledge that PHP was even used to make the page!
If you have some dynamic code that must run offline, then you must use Javascript. If this is just for testing on your own machine, put a web server running PHP on your dev machine and acccess it via http://localhost.
HTML5 offline caching does not work to make your pages interact; it works only to make a particular page available offline. Basically, it works on a URL-by-URL basis. If you absolutely need offline functionality, you will be forced to make it work in JS.
Also, make sure your manifest includes all resources used by all pages.
Hope this helps!
It seems obvious not to use any server side scripting language file while caching it in your browser. PHP/JSP/ASP etc all are server side language we cant fulfill the request forwarded by client that need to be generated dynamically and most importantly there is no server running on client side. SO , i think we should go for JS whenever we want to do such things.
I am developing a web application.
I would like to extend my error messages (and their backtraces) so that I can click on the mentioned file, and have it opened automatically in my PHP IDE.
I would like to make this a easy-to-activate feature so that whoever works on the web application, can easily map the error message to point to their local copy of the site, and open their IDE.
What - short of developing a custom FF extension - is the simplest way you can think of to execute a local command (a batch file that calls the IDE) on click in Firefox on Windows(7)?
I have looked for extensions but had no luck. Maybe using another extension like Firebug or Greasemonkey?
Security is not an issue, as this is supposed to work on the developer's workstation only and I can change my local Firefox's settings.
You can add a new protocol (like "edit://") to windows (http://msdn.microsoft.com/en-us/library/aa767914(VS.85).aspx) and write a small handler program that picks a filename from the "edit://" url and passes that file to the editor. This way i taught windows to understand txmt links (http://blog.macromates.com/2007/the-textmate-url-scheme/) in the way my mac does.
There's not a way to do this with javascript. But it looks possible with a firefox addon. Have a look at this.
http://mozex.mozdev.org/
MozEX is an extension which allows the user to use external programs for these actions:
* edit content of textareas (possibly utilizing a spell-checker, color syntax etc.)
* view page source
* handle mailto, news, telnet and FTP links
* download files
* ... and many more :)
The universal handler lets you enter a list of protocol schemes, e.g., "abc://,def://" and a
command to handle them. So you just have your application generate a url that begins with
your chosen (made up) protocol, and mozex will intercept a click on the url and send the
url to your chosen command as a paramater.
I think this is exactly what you want.
I think that the closest you can get to this, is by having the configuration of the web browser associate a particular mime type with a given "helper application" (here the IDE program), and to have the HTTP server return such a file.
Otherwise, security concerns dictate that browser would not run any "abritrary" program/logic on the client.
Pekka,
After reading the thread so far, it seems that you want to build an application that somehow authenticates with the server--i.e.: the "average user" wouldn't have access to it. If this were the case, then delivering it through the browser is an impossibility without writing a custom extension.
Running authentication through GreaseMonkey is difficult, but once the client is authenticated, there is no real way to "run" the trace.
If the server generates a batch file or some kind of instruction set (script, shortcut, etc.), you can simply configure the browser (or have the local instance of your app configure the browser) to run the file. The problem here is that you have no way to automatically authenticate!
The only other way I can imagine that you could get this to work is via a Java applet, which would only be cumbersome and require Java to initialize every time you wanted to import a trace.
The problem you have is that the browser is inherently secure. It's designed to protect the computer from malware, rogue websites, etc etc., and so without developing a custom extension for the browser, there's no way to make the hop to any applications that run in tandem with the browser.
So on that note, I'll suggest that you reconsider writing a Firefox XUL extension as mentioned above. You'll probably need to implement some XPCOM code to make it work, too. Here are some resources that will help get you started:
https://developer.mozilla.org/en/xpcom
https://developer.mozilla.org/En/XUL
http://ted.mielczarek.org/code/mozilla/extensiondev/
https://developer.mozilla.org/en/XUL_Tutorial/Introduction
I don't know which IDE you're using, but in for example Eclipse you can also use the built-in webbrowser to test your webapp and the exceptions/traces in the Eclipse console log already have links to the source code in question. Easy as that. See if your IDE provides something similar.