I'm brand spankin' new to ispconfig and was asked to hook into the api to set up some dns entries for new sites that we create on our windows servers. I've been able to get the dns_cname_add and dns_zone_get methods working. But I'm not clear on the dns_cname_get method. The second parameter in the function is called $primary_id. I guessed that this was the cname I was looking up, so I tried plugging in one that I know is registered. However I was returned an empty array. I then tried sending in the same $params array that I used in the dns_cname_add but still get the same result. Does anyone have any examples of usage for the dns_cname_get method and specifically, what should I be sending in as the $primary_id? Thanks.
The primary ID Variable may either contain the primary ID of that table that you are working on. DNS Records are stored in the table dns_rr, so the primary of that table is the id column. If you want to search for a record, then you can pass a array as primary_id e.g.: $primary_id = array('name' => 'helloworld.tld', 'type' => 'CNAME');
Thank you. The parameter list was basically one of the things I tried to do but I must have had a typo somewhere because now it's working when I retried. Thanks again.