The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Delete a zone record for a domain using WHM API

Discussion in 'cPanel Developers' started by Srikanth79, Jan 23, 2016.

  1. Srikanth79

    Srikanth79 Member

    Joined:
    Dec 29, 2015
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    India
    cPanel Access Level:
    Root Administrator
  2. cPDavidN

    cPDavidN cPanel Developer
    Staff Member

    Joined:
    Mar 19, 2013
    Messages:
    42
    Likes Received:
    3
    Trophy Points:
    8
    cPanel Access Level:
    DataCenter Provider
    Hi Srikanth,

    You can use ZoneEdit::fetchzone_records to obtain a data structure representing the zone file you're modifying. Every record returned by that call will have its line number associated with it. Keep in mind that if you delete multiple records, line numbers may change because records above that line were removed, so make sure you either remove records from the bottom up, or use fetchzone_records again after every record removal.

    David Nielson
    cPanel developer
     
Loading...

Share This Page