
<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="https://doc.openprovider.eu/skins/common/feed.css?207"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://doc.openprovider.eu/index.php?action=history&amp;feed=atom&amp;title=Replace_existing_zones_with_a_DNS_template</id>
		<title>Replace existing zones with a DNS template - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://doc.openprovider.eu/index.php?action=history&amp;feed=atom&amp;title=Replace_existing_zones_with_a_DNS_template"/>
		<link rel="alternate" type="text/html" href="https://doc.openprovider.eu/index.php?title=Replace_existing_zones_with_a_DNS_template&amp;action=history"/>
		<updated>2026-04-21T13:57:17Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.15.2</generator>

	<entry>
		<id>https://doc.openprovider.eu/index.php?title=Replace_existing_zones_with_a_DNS_template&amp;diff=1503&amp;oldid=prev</id>
		<title>WikiSysop at 09:57, 31 August 2017</title>
		<link rel="alternate" type="text/html" href="https://doc.openprovider.eu/index.php?title=Replace_existing_zones_with_a_DNS_template&amp;diff=1503&amp;oldid=prev"/>
				<updated>2017-08-31T09:57:08Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;

		&lt;table style=&quot;background-color: white; color:black;&quot;&gt;
		&lt;col class='diff-marker' /&gt;
		&lt;col class='diff-content' /&gt;
		&lt;col class='diff-marker' /&gt;
		&lt;col class='diff-content' /&gt;
		&lt;tr valign='top'&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 09:57, 31 August 2017&lt;/td&gt;
		&lt;/tr&gt;
		&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 47:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 47:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;  echo &amp;quot;Creating zone: &amp;quot; . $domain . &amp;quot;\n&amp;quot;;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;  echo &amp;quot;Creating zone: &amp;quot; . $domain . &amp;quot;\n&amp;quot;;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;  $replycreate = $api-&amp;gt;process($createrequest);&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;  $replycreate = $api-&amp;gt;process($createrequest);&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;  echo &amp;quot;Result create (0 means no error):&amp;quot; . $&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;replydelete&lt;/del&gt;-&amp;gt;getFaultString() . &amp;quot;\n&amp;quot;;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;  echo &amp;quot;Result create (0 means no error):&amp;quot; . $&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;replycreate&lt;/ins&gt;-&amp;gt;getFaultString() . &amp;quot;\n&amp;quot;;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;nbsp; }&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;nbsp; }&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;nbsp; ?&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;nbsp; ?&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;!-- diff generator: internal 2026-04-21 13:57:17 --&gt;
&lt;/table&gt;</summary>
		<author><name>WikiSysop</name></author>	</entry>

	<entry>
		<id>https://doc.openprovider.eu/index.php?title=Replace_existing_zones_with_a_DNS_template&amp;diff=711&amp;oldid=prev</id>
		<title>WikiSysop:&amp;#32;Created page with 'Before using this script, please make sure to read API General Examples  Using this script is at your own risk!   &lt;?php  require_once('API.php');  $api =…'</title>
		<link rel="alternate" type="text/html" href="https://doc.openprovider.eu/index.php?title=Replace_existing_zones_with_a_DNS_template&amp;diff=711&amp;oldid=prev"/>
				<updated>2015-02-10T15:37:54Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;#39;Before using this script, please make sure to read &lt;a href=&quot;/API_General_Examples&quot; title=&quot;API General Examples&quot;&gt;API General Examples&lt;/a&gt;  Using this script is at your own risk!   &amp;lt;?php  require_once(&amp;#39;API.php&amp;#39;);  $api =…&amp;#39;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Before using this script, please make sure to read [[API General Examples|API General Examples]]&lt;br /&gt;
&lt;br /&gt;
Using this script is at your own risk!&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?php&lt;br /&gt;
 require_once('API.php');&lt;br /&gt;
 $api = new OP_API('https://api.openprovider.eu');&lt;br /&gt;
 &lt;br /&gt;
 $username = '--';&lt;br /&gt;
 $password = '--';&lt;br /&gt;
 &lt;br /&gt;
 $domains = array('name1,tld','name2,tld','name3,tld');&lt;br /&gt;
 &lt;br /&gt;
 foreach ($domains as $domain) {&lt;br /&gt;
     &lt;br /&gt;
     $domainexploded = explode(&amp;quot;,&amp;quot;, $domain);&lt;br /&gt;
     &lt;br /&gt;
     $deleterequest = new OP_Request;&lt;br /&gt;
     $deleterequest-&amp;gt;setCommand('deleteZoneDnsRequest')-&amp;gt;setAuth(array(&lt;br /&gt;
         'username' =&amp;gt; $username,&lt;br /&gt;
         'password' =&amp;gt; $password&lt;br /&gt;
     ))-&amp;gt;setArgs(array(&lt;br /&gt;
         'domain' =&amp;gt; array(&lt;br /&gt;
             'name' =&amp;gt; $domainexploded[0],&lt;br /&gt;
             'extension' =&amp;gt; $domainexploded[1]&lt;br /&gt;
         )&lt;br /&gt;
     ));&lt;br /&gt;
     &lt;br /&gt;
     $createrequest = new OP_Request;&lt;br /&gt;
     $createrequest-&amp;gt;setCommand('createZoneDnsRequest')-&amp;gt;setAuth(array(&lt;br /&gt;
         'username' =&amp;gt; $username,&lt;br /&gt;
         'password' =&amp;gt; $password&lt;br /&gt;
     ))-&amp;gt;setArgs(array(&lt;br /&gt;
         'domain' =&amp;gt; array(&lt;br /&gt;
             'name' =&amp;gt; $domainexploded[0],&lt;br /&gt;
             'extension' =&amp;gt; $domainexploded[1]&lt;br /&gt;
         ),&lt;br /&gt;
         'type' =&amp;gt; 'master',&lt;br /&gt;
         'templateName' =&amp;gt; 'Default'&lt;br /&gt;
     ));&lt;br /&gt;
     &lt;br /&gt;
     echo &amp;quot;Deleting zone: &amp;quot; . $domain . &amp;quot;\n&amp;quot;;&lt;br /&gt;
     $replydelete = $api-&amp;gt;process($deleterequest);&lt;br /&gt;
     echo &amp;quot;Result delete (0 means no error):&amp;quot; . $replydelete-&amp;gt;getFaultString() . &amp;quot;\n&amp;quot;;&lt;br /&gt;
     &lt;br /&gt;
     &lt;br /&gt;
     echo &amp;quot;Creating zone: &amp;quot; . $domain . &amp;quot;\n&amp;quot;;&lt;br /&gt;
     $replycreate = $api-&amp;gt;process($createrequest);&lt;br /&gt;
     echo &amp;quot;Result create (0 means no error):&amp;quot; . $replydelete-&amp;gt;getFaultString() . &amp;quot;\n&amp;quot;;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 ?&amp;gt;&lt;/div&gt;</summary>
		<author><name>WikiSysop</name></author>	</entry>

	</feed>