Using PHP with Google App Engine to administer Google Apps - php

I am trying to create a Google App Engine Web application in PHP that is capable of administering my Google Apps users and groups and create detailed per-user reports.
The built-in PHP API is appallingly inadequate with seemingly no functionality to perform user administration so I wanted to use the Google APIs Client Library for PHP but I'm having trouble including this API in my Google Apps project.
Can anyone suggest how I can best approach this?
Should I use the built-in PHP API provided by Google App Engine? If so, which classes can I use to perform user management?
How can I use the Google API PHP Cient together with my Google App Engine?
Should I just abandon Google App Engine and host the web app on my own servers?
Should I use something else like Java instead of PHP?
Thanks in advance for any help and or suggestions on how to proceed.

Did you do a quick google search on using the Google API PHP Client from App Engine?
Is so, you might have seen this article which I guess explains the entire thing for you.

In your project you need to select ADMIN SDK which should give you access to all api's realted to that. Directory API etc.
At least that is what I think and how I have it setup. Only since I am a very little skills I struggle to use the PHP library ;)

Related

Hosting iOS back-end app logic on google cloud

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

How to access existing APIs using Slim Framework from a PHPFox website on mobile app (iPhone and Android)?

I've one website built in PHPFox. The website is functioning properly. Now the mobile apps for iPhone and Android smartphone are under development which will use the same database that PHPFox website is using.
So, I want to make the existing APIs that are used for a PHPFox website available to the mobile apps (both iPhone and Android) as well. I don't want to reinvent the wheel again and want to re-use the same existing code for mobile apps.
I did a lot of research about this. I've spent almost four days on the research. I didn't get a single link which will explain me how to access the existing APIs from a PHPFox website for mobile apps (iPhone and Android).
One option I found from my research is creating new RESTful webservices using PHP or implement any such framework like Slim, apigility, etc.
But I think following any of the above two approaches will be a overhead and re-usability of code will also not be achieved. If the code which is working fine for website should also be used used on mobile apps. There should be no need to write the same code again. That's what I think.
So using the existing APIs from PHPFox website is the best solution that I think, might be I'm wrong. If you think I'm wrong please correct my approach.
If you could explain with some useful example it would be really great.
I've gone through PHPFox docs as well but couldn't get anything useful which could help me in the issue I'm facing. If you are also interested in documentation of PHPFox please go to below links:
http://unity.moxi9.com/docs
http://unity.moxi9.com/kb
If you could find anything useful related to the issue I'm facing please do let me know.
Well everything you are looking for is already there in the docs. Your mobile app would be registered as an app with PHPFox. You can then use their API. The remaining question is, if the end users need to authorize your mobile app from their "normal" web browser or if this authorization can be performed from the mobile app as well. At least that's what I read from the docs. Since you have an up and running installation at your hand: Just try it! Register an app and perform some requests to their API.

Moving a static web page from Google Drive to a PHP friendly environment?

I have hosted some pages in Google drive hosting. Working Fine. But I need to add server side scripting.
The Google Drive FAQ states, that I can't run server side scripts like PHP, so I need to have an alternative.
So I have 2 questions:
Can I keep the pages on Google drive but add scripting from somewhere else?
What alternatives do I have to host PHP pages comfortably
Google drive makes live quite easy, since I can create files locally and it takes care of synchronization.
What would you recommend to look at/look for?
First thing, server side scripting is not allowed at Drive. Though at Google, you can use Google App Engine for scripting purposes. Many more languages are now supported here, like Go, PHP, Python and Java. You can learn App Engine.
Second thing, to get a better hosting experience, purchase some server space. For learning purposes, you can sign up at many free hosting services. Later switch to the paid version.
Google Drive is not made for what you're trying to do.
You might want to look into Google Cloud or Google App Engine.
Google drive simply doesn't allow PHP. It is stated [in the documentation](
https://support.google.com/drive/answer/2881970?hl=en), which is the first link when you google "Google drive PHP"
To run code on files hosted in Google, you need to use the Google App Engine. It does run PHP, Java, Python, Go.
But it might not be what you are looking for. Using a classic web site hoster might be the better approach

Youtube Analytics PHP cron

I want to start developing a tool that runs daily via cron for getting daily analytical data from one channel, or video, etc.. through the "Youtube Analytics API". And not what is the best way to approach it.
I have read the documentation of Google and and I have several questions:
I created the project in the console (https://code.google.com/apis/console/) but I doubt what kind of application I have to choose when I create a Client ID (Web Application, Service Account or Installed aplplication).
What PHP library use?
It's a very new API and not much information.
In the Google GData site there is a warning about that "Most newer Google APIs Google Data APIs are not Google Data APIs." and in the google-api-php-client, no examples of this API.
What is the best method for authentication in a cron?
As you can see I am very confuse, can someone help me, please?
Thank you.
1) It will be an installed application unless you will run it in a web server.
2) Use the official library, add the ytanalytics php library. Samples: https://github.com/youtube/yt-samples-php
3) You can do so by getting a refresh token from OAuth2 Playground and setting it in your youtube object.
Here it explains a little more.
And a step by step video.

Website sync of contacts and reminders with iCloud

I'm building custom CRM web based system and have integrated synchronization of contacts and reminders with Google apps and need do the same with Apple iCloud. Is there any way how to do it? I haven't find any official API for this purpose, CRM is written in PHP, but I'm able to use python for this purpose as well.
To the best of my knowledge, there is no way to interface with iCloud directly; it can only be done through an iOS or Mac OS app, and by calling the correct iCloud Objective-C APIs with UI/NSDocument classes. Since you are not using Cocoa, let alone Objective-C, you will most likely not be able to do this. I may be wrong of course, as I haven't conducted an in-depth search into this.
I would recommend that you sync using the google contacts api. Then, you can tell iPhone people to use that instead of iCloud.
I agree with the first and second answer since I too haven't found any solution to access a large portion of the iCloud data via PHP. It seems the best solution would be to make an mobile app to do most of the work. This may save a lot of time in fact.
However if you can get your users to install an app then make your own cloud. There is an open source software like: own Cloud link below that is very good at it.
https://owncloud.org/
You may want to take a look at this project: https://github.com/adammck/ruby-icloud . It accesses iCloud reminders using Ruby.

Categories