How to use google-api-php-client for Cloud DNS management -


I have enabled setup billing and whatnot, and the Cloud DNS API in Google Developer Console, although it is very confusing, and The documentation is taking me into circles without real examples.

How do I use the Google Cloud DNS API, delete a DNS entry, and update a DNS entry using Google Aperi-PHP-Client script.

I am unsure of what I want to use for this, because there is no way to create credentials - only a unique app id for this unique service (which can not be changed ).

Their documents point to the stack overflow for any question regarding the use of this library.

Thank you in advance

I have not used the cloud DNS, but the API other The services seem to follow the same format, so I tell you how it will work.

Dukeman is not the best thing for the PHP Library, but you can understand what should be done by observing the comments.

I'm not sure that you have used the library before, but the first step is to create a Google_Client object and prove on Github's example.

You make credentials on it. Select project and then select API on sidebar & amp; auth / credentials

The code below is clearly a draft, all the methods and options available are also available to check the source of the library.

  & lt ;? Php // value $ client is a Google_Client instance // which is already certified $ dns = new Google_Service_Dns ($ client); $ Change = new Google_Service_Dns_Change (); $ Addition1 = New Google_Service_Dns_ResourceRecordSet (); // $ addition1 configure, lib $ deletion1 = check the new Google_Service_Des_ResourceRecordSet () methods; // $ deletion1 Configure the lib $ additions = array ($ addition1, ..., $ additionN); $ Deletion = Array ($ Deletion 1, ..., $ Deletion N); $ Change-> SetAdditions ($ Extra); $ Change-> SetDeletions ($ Deletion); // $ settings on other settings, lib $ dns- & gt; Change-> Check Create ($ Project, $ Managed Zone, $ change);    

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -