I am new to using Parse and am developing an app using it as a backend. I want to also use it to develop a portal that would access data submitted from the mobile app.
Can I use Parse Cloud Code to upload my PHP files there (developed using PHP SDK)? Or should I upload it to another hosting provider and connect to Parse?
In the docs, it states I can use javascript library there but didn't catch anything about PHP SDK files uploaded and accessed from there.
Thanks,
No you can't, Cloud Code only supports JavaScript. If you want to use PHP for server-side logic (beforeSave triggers for example), look into using Webhooks which will hit an endpoint on a server specified by you (see https://www.parse.com/docs/js/guide#cloud-code-advanced-cloud-code-webhooks)
If you are looking into hosting some sort of frontend on Parse (for example an admin area) then your only option is JavaScript, see https://www.parse.com/docs/js/guide#hosting
Related
I have developed a CodeIgniter app and now I would like to run it in native app using Cordova. As what I have found is that Cordova doesn't support running php script in html which is now a concern for me. May I know is there any other ways to solve this?
"As Cordova only uses static assets (HTML, CSS, JS) as main components to create a working app and doesn’t run server side scripts (.php) for example, simply you can create API endpoints for your website that return JSON data, then you can connect to these endpoints via AJAX calls from your JS file in the app so you get the JSON which you can parse it and print it to DOM."
Taken from https://www.quora.com/How-can-I-build-a-PhoneGap-Cordova-app-from-a-CodeIgniter-website-or-any-dynamic-website
I have a PHP app deployed in GAE(Google App Engine)
I need to connect to Google Docs, Google Spreadsheet URL below and do all editions/manage(edit a Doc, Edit a Sheet,...etc) as like I am able to do via GAS, just like we manage the CAL API.
https://developers.google.com/apps-script/reference/document/
https://developers.google.com/apps-script/reference/spreadsheet/
What is the best approach for it? How to use those functions available in GAS via PHP GAE?
Plz someone help, a small tip would also help us.
In PHP, you can make an HTTP Request. In Apps Script, you can create a Stand Alone Apps Script project, that detects either a GET or POST request, and runs code. Then the code can do whatever you want it to do (E.g. write data to spreadsheet). When the code is done, you can have it return something back to the PHP code that called it.
So, you can use an Apps Script project as an intermediary between your PHP and a Google spreadsheet. This avoids needing to use the PHP API for Google Spreadsheets. The Apps Script file is an intermediary between your PHP code and getting data written/read from your spreadsheet. But an API is also an intermediary. So, in that sense it's the same. If you already have Apps Script code that does what you want, you can trigger it to run with a doGet() or doPost() function. And you can avoid learning the API.
For more information see the following post:
stackoverflow answer - Call a custom GAS function from external URL
I've written a simple web app that creates a MS Word document from an HTML form (using JavaScript and PHP also) but I've since converted to Google Docs.
After spending most of the day trying to see if switching from .docx's to .gdoc's was doable (perhaps with a different PHP plugin), I can't seem to find a way to programmatically create a Google Doc without using Google Scripts or a server running Google App Engine.
My question: Can a Google Document get programmatically created using PHP and an HTML form?
You can check the Google Drive SDK documentation for everything related to Google Docs: https://developers.google.com/drive/web/about-sdk
An easy way to push files in would be to upload them: https://developers.google.com/drive/web/manage-uploads#simple
We have to develop an application with more plattform. We would use the framework PhoneGap. For our application we need services of backend, the question is: Does PhoneGap support PHP?
If it doesn't support PHP. In which way we can solve the problem?
The most important thing is: make call server
(Get and Post), parsing a json and other functions
that PHP gives.
Phonegap does not have a server. You need to call via Ajax to remote servers.
The backend can be in any language which supports HTTP calls, as PhoneGap is an independent client.
You can use PHP to write an API for use within your Javascript PhoneGap application.
I can recommend the Laravel framework to accomplish this.
Yes...you can use PHP or any PHP framework to give backend for mobile app made using phonegap/cordova....point is phonegap/cordova app will be on client mobile which won't understand PHP embedded in phonegap html files....so write an API amd place it on a server and then make AJAX calls to server to do database and other backed operations
Try to return JSON data from the PHP API.....it's a famous data structure and supported by many applications
I want to develop a module for card scanning using CSSN.They gave the sample code for another languages like C#,Delphi etc.(except PHP).
Is there any sample code for scanning the document using PHP with this CSSN device?Whether we can develop application for this scanner using PHP?
Looking at their website, and based on the fact that they're using ActiveX controls, I get the feeling you'll never get this working on a language that doesn't use Microsoft's runtime. Even if you were able to somehow get it working, I doubt you would get much support from them on it.
I would recommend, instead, writing a program in a language they support that can in turn talk to your PHP application. As the SDK sends events to your intermediate app it can send them on to your PHP program, and the PHP program can send commands to the SDK through the intermediate app.