correct way to call dns_ptr_update?

Discussion in 'Developers' Forum' started by Turgut Kalfaoglu, Feb 11, 2025.

  1. Turgut Kalfaoglu

    Turgut Kalfaoglu Member HowtoForge Supporter

    Hi. Following this, https://fossies.org/linux/ISPConfig/remoting_client/API-docs/dns_ptr_update.html
    I coded my program.. The previous PTR record was like:
    65.109.18.75 86400 PTR usa-mythos.com.
    My aim was to change the IP address, so I did it like this:
    Code:
         $newdata  = $new_ipv4;
                               $params = [
                                   'server_id' => $record['server_id'],
                                   'zone' => $zone_id,
                                   'name' => $record_name,
                                   'type' => $record_type,
                                   'data' => $newdata,
                                   'aux' => $record['aux'],
                                   'ttl' => $record['ttl'],
                                   'active' => $record['active'],
                                   'stamp' => $record['stamp'],
                                   'serial' => $record['serial'],
                               ];
                               $client->dns_ptr_update($session_id, $client_id, $record_id, $params);
    
    but that caused the PTR entry to become this:
    65.109.18.75 86400 PTR 22.33.44.55
    :) So, what's the correct way to obtain
    22.33.44.55 86400 PTR usa-mythos.com.
    ? Thanks!
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    name = 22.33.44.55
    data = usa-mythos.com.
     
    Turgut Kalfaoglu likes this.
  3. Turgut Kalfaoglu

    Turgut Kalfaoglu Member HowtoForge Supporter

    Many thanks!
     

Share This Page