First of all i am going to use REST with JSON because of its simplicity.
So i dont need nusoap etc. The web service is written in C# and runs on azure. After trying i successfully runed a hello word PHP application on azure.
My question is how to consume these webservices? The classic php way ? Or use a library from azure for PHP sdk? Because i saw that libraries have a curl and some other functions.
You can consume Web services written in C# on Azure in the same way as you would consume any Web service running on any platform. Deployment to Azure makes no difference.
The PHP toolkit for Azure (tutorial documentation here: http://azurephp.interoperabilitybridges.com/tutorials) is a library for PHP that lets you work with Azure-specific features. This includes
Azure table, blob and queue storage
Diagnostics and remote access
Automating deployment
You won't need anything from the Azure for PHP library to just consume simple a C# Web service.
Related
I have an iOS app with its backend logic written in PHP and using MySQL on Cloud SQL. I'm trying to figure out how to connect the iOS app to the PHP files through Google App Engine. I'm using Standard environment.
I was looking into Google Cloud Endpoints but they only seem to work for Java and Python files. Have I misunderstood this?
Any guidance would be greatly appreciated,
Cheers :)
As you are using GAE Standard, you would be using Cloud Endpoints Framework, which does not support PHP.
Your options are:
Use GAE Flexible and Cloud Endpoints OpenAPI, which does support PHP.
Don't use Cloud Endpoints, instead use Apigee.
Don't use Cloud Endpoints, instead use a 3rd party API framework such as Slim
I have the QuickBooks desktop app as well as a Zoho CRM subscription. The thing is I am new to QuickBooks and would like to have my data in sync across both of these. I use node.js most of the time but PHP is also an option.
Remember, I need to do it bidirectionally.
I looked up the web connector thing and yet I have no idea where to start.
Please provide a few pointers and libraries I could use.
All development for the desktop will need to be done through the QBXML SDK.
https://developer.intuit.com/v2/docs/0250_qb
To connect to a web application, you will need to use the QB Web Connector (QBWC) included with QB desktop. There is a QBWC server sample included in the SDK along with programmer guides for QBXML and QBWC.
If you are using PHP, there is an open source project available that has the server built and sample requests.
http://consolibyte.com/quickbooks-open-source/
I'm developing an Android app, and due to time circumstances, I started developing the project in PHP, together with a MySQL backend. is it possible to package the project folder as a APK where it could be opened within the tablet?
I understand Android applications are meant to be written in Java, and I have checked out:
http://phpforandroid.net/
But it doesn't answer if it was possible to package a complete PHP project as an APK.
No. Since PHP is a server side language you would have to run a webserver and a MySQL server on the device (like #deceze said).
Since you have already started development in PHP my recommendation would be to develop a web based application and have your users access it from a very lightweight client on the Android device. You could use something like PhoneGap or AppCelerator to develop a front end client app since I'm guessing your talents lie in web development :)
"When all you have is a hammer, you start to approach every problem as if it was a nail"
You're using the wrong tool for the job. PHP is not meant for writing interactive GUI applications, it's meant for running server side scripts or commandline scripts. Even if you could easily run PHP on an android phone (which you cant), it would be the wrong choice of language for a phone app.
You have two options
1) throw away the work you've done so far and redo it in a language more appropriate to the task at hand
2) deploy your application to a publicly accessible web server and run it via the handset's web browser.
If you think about it, you'd need to squeeze a web server, the PHP core, whatever extensions your application uses and a MySQL server onto a handheld device. This is seriously overkill.
And why MySQL? Android provides SQLite database support.
Is it possible to use the Google App Engine with datastore only and keep your application on an external traditional server?
I'm interested in the GAE for Business SQL service coming soon but I only want to use GAE for the database. I would like to keep the php application on a traditional server for a variety of reasons.
Is this possible?
Yes it is possible and GAE is fairly used in this specific scenario; think about the hundreds of Iphone/Android applications that use GAE as back-end.
A simple common design would have:
A Web API to communicate with GAE datastore since you can't connect directly to it from your php application. Have a look to restlet for a cool RESTful Java web framework that supports GAE or the new Appengine-rest-server Python project .
A security check to validate that the requests are coming from the php application (HMAC / SSL).
We connect to a web service hosted by another company. We send a customer's basic info to the service, and it replies with rates/prices for that customer.
I am a PHP guy -- started out playing with basic HTML, then delved into PHP about 8 years ago, and my entire web app is PHP with javascrtipt/ajax mixed in as needed. I'm a learn-as-I-go guy.
For the last two years, the service has been an aspx web service, which was easy -- just connect with PHP's SoapClient. Now, the company hosting the service has changed it to WCF, and the binding is wsHttpBinding, and authentication is done via x509 certification.
I've determined that PHP's SoapClient can't handle wsHttpBinding. So my first roadblock - how the heck do I connect to this service? I went as far as to install MS Visual Web Developer 2010 Express, and then I used svcutil.exe to create .config and .cs files for the service. But understand, I've never written anything in C# or VB. I've done a few little VBScripts in the past, and I can handle javascript... but I'm looking at these .config and .cs files and thinking, now what the heck do I do with these??
Basically, I just want to connect to this service using PHP and javascript. But since it seems that's impossible (correct?), is there a way I can invoke a VB/C# operation from within my PHP script? For instance, pull the customer's info from mysql and prepare the data for the service using PHP, then use VB/C# to connect to and communicate with the service? Or any better ideas?
All hints/ideas/suggestions are greatly appreciated!
Interesting. You are connecting to web service hosted by another company and they probably know that you are using PHP. Despite it they modified the service in the way which is not fully compatibile with PHP.
I'm .NET guy. I have already done some projects where WS-Security an PHP was involved. I was in opposite situation. My service was written in PHP and I had to consume it in .NET. The situation was much easier because .NET supports much bigger set of WS-* protocols.
I know that PHP team used WSO2 Web Services Framework to create the service. You can try to use it in your case to consume .NET service.