dyninc / dyn-php Goto Github PK
View Code? Open in Web Editor NEWDyn SDK for PHP
License: BSD 3-Clause "New" or "Revised" License
Dyn SDK for PHP
License: BSD 3-Clause "New" or "Revised" License
I could be missing something, but based on the example script I have modified it to try and fetch all zones but instead I get back an empty array.
<?php
use Dyn\TrafficManagement;
use Dyn\TrafficManagement\Record\A;
require ('./vendor/autoload.php');
$tm = new TrafficManagement('customer', 'user', 'password');
// login
$tm->createSession();
$allZones = $tm->getZones();
print_r($allZones[0]->getAllRecords());
exit;
Obviously I have omitted my credentials here, but if I use the same code for fetching a single zone it works fine.
public function getAllNodes($fqdn = null)
{
$path = '/NodeList/'.$this->name;
if ($fqdn) {
$path .= '/'.$fqdn;
}
$path .= '/';
$result = $this->apiClient->get($path, array('detail' => 'y'));
if ($result && $result->isComplete()) {
return ($result->data);
}
return false;
}
When installing:
Package zendframework/zend-escaper is abandoned, you should avoid using it. Use laminas/laminas-escaper instead.
Package zendframework/zend-http is abandoned, you should avoid using it. Use laminas/laminas-http instead.
Package zendframework/zend-loader is abandoned, you should avoid using it. Use laminas/laminas-loader instead.
Package zendframework/zend-mail is abandoned, you should avoid using it. Use laminas/laminas-mail instead.
Package zendframework/zend-mime is abandoned, you should avoid using it. Use laminas/laminas-mime instead.
Package zendframework/zend-stdlib is abandoned, you should avoid using it. Use laminas/laminas-stdlib instead.
Package zendframework/zend-uri is abandoned, you should avoid using it. Use laminas/laminas-uri instead.
Package zendframework/zend-validator is abandoned, you should avoid using it. Use laminas/laminas-validator instead.
Writing lock file
This package should either be abandoned or updated to use the recommended replacement packages
thanks!
Hello!
I'm running into an issue when creating HTTP Redirects, specifically with the keepUri
setting. It seems that it doesn't matter if it is set to true or false, this setting does not get updated when verifying through the management dashboard.
Here is my setup:
$dyn = new TrafficManagement($config);
$dyn->createSession();
$zone = $dyn->getZone($domainName);
$redirect = new HTTPRedirect;
$redirect->setCode(302);
$redirect->setKeepUri(true);
$redirect->setUrl('https://' . $domainName);
$zone->createService($redirect, 'www.' . $domainName);
$dyn->deleteSession();
Any ideas as to what I may be doing wrong, or is this an actual API issue?
I cannot find to add notes during DNS change publishing. Would it be possible to add that functionaility?
use of the $type + classname is creating duplicate entries,
cause by line 441 in zone.php
This happens for each record type.
the symptom:
Array
(
[CNAME] => Array
(
)
[Dyn\TrafficManagement\Record\CNAME] => Array
(
[0] => Dyn\TrafficManagement\Record\CNAME Object
(
[type:protected] => CNAME
[cname:protected] => asdfsdfa.com.
[id:protected] => 150588609
[fqdn:protected] => asdfsadf.whole_rest.nl
[ttl:protected] => 3600
[rdata:protected] =>
)
I want to get node list from selected zone. Any example to do it?
Running in windows on the command line.
PHP / composer installed
PHP Fatal error: Uncaught exception 'Zend\Http\Client\Adapter\Exception\RuntimeException' with message 'Error in cURL request: SSL certificate problem: unable to get local issuer certificate'
\src\dyn-php\vendor\zendframework\zend-http\src\Client\Adapter\Curl.php:422
Stack trace:
I suspect it's something to do with cacert.pem in zendesk - but don't have enough knowledge to fix.
I create DDNS update user: xxxx-user01 from http://manage.dynect.net
I create first domain1.example.net
// configure the new service
$service->setAddress('1.2.3.4') // initial IP address
->setRecordType('A') // 'A' or 'AAAA'
->setUsername('xxxx-user01');// update client user (will be created)
// create the new service on test.example.com
$zone->createService($service, 'domain1.example.net');
.....
Result: domain1.example.net created and xxxx-user01 is update user for domain1.example.net
After, I create domain2.example.net'
// configure the new service
$service->setAddress('1.2.3.4') // initial IP address
->setRecordType('A') // 'A' or 'AAAA'
->setUsername('xxxx-user01');// update client user (will be created)
// create the new service on test.example.com
$zone->createService($service, 'domain2.example.net');
Result: domain2.example.net created and xxxx-user01 is update user for domain domain2.example.net
But user xxxx-user01 can not update for domain1.example.net because no right.
If I create domain3 with user xxxx-user01, domain1 and domain2 will no right...
Hi,
I am testing out the sdk, and have been able to getRecords and createRecord with no problem.
My issue is that when a record is created it simply returns true (link). When it is created the API is returning a result (see response section) which contains a unique id that I would like to save to my local database so can reference the record at a later date.
Is that something you can setup?
Thanks.
Hi,
After I create a zone, I then immediately create a record for that zone, 90% of the time the record does not get created.
I added a additional line of code sleep(5) between the calls in my code, and that seems to work, this is not ideal though.
Looking over the sdk, I noticed that if any of the api calls fail, the sdk simply returns false, so i am never able to retrieve the error message from the sdk to determine what the error message is.
Also when creating a zone, the same issue arises, it returns false on failure.
I know that the system uses jobs, that is why it always returns a job id in the response, but I did not see the ability to get a job using the sdk.
If you could help me out, that would be great.
Thanks.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.