
<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="https://doc.openprovider.eu/skins/common/feed.css?207"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
	<channel>
		<title>Retrieve full price list - Revision history</title>
		<link>https://doc.openprovider.eu/index.php?title=Retrieve_full_price_list&amp;action=history</link>
		<description>Revision history for this page on the wiki</description>
		<language>en</language>
		<generator>MediaWiki 1.15.2</generator>
		<lastBuildDate>Wed, 22 Apr 2026 05:58:26 GMT</lastBuildDate>
		<item>
			<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');    …'</title>
			<link>https://doc.openprovider.eu/index.php?title=Retrieve_full_price_list&amp;diff=898&amp;oldid=prev</link>
			<description>&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;);    …&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;
 &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;
   $limit = 10;&lt;br /&gt;
   $offset = 0;&lt;br /&gt;
   &lt;br /&gt;
   do {&lt;br /&gt;
     $request = new OP_Request;&lt;br /&gt;
     $request-&amp;gt;setCommand('searchExtensionRequest')&lt;br /&gt;
       -&amp;gt;setAuth(array('username' =&amp;gt; $username, 'password' =&amp;gt; $password))&lt;br /&gt;
       -&amp;gt;setArgs(array(&lt;br /&gt;
         'withPrice' =&amp;gt; 1,&lt;br /&gt;
         'withDescription' =&amp;gt; 0,&lt;br /&gt;
         'withDiscounts' =&amp;gt; 0,&lt;br /&gt;
         'status' =&amp;gt; array('GAV','ACT'),&lt;br /&gt;
         'limit' =&amp;gt; $limit,&lt;br /&gt;
         'offset' =&amp;gt; $offset,&lt;br /&gt;
       ));&lt;br /&gt;
     $reply = $api-&amp;gt;process($request);&lt;br /&gt;
     $value = $reply-&amp;gt;getValue();&lt;br /&gt;
   &lt;br /&gt;
     if ($offset == 0) {&lt;br /&gt;
       echo &amp;quot;Price list retrieved at &amp;quot;.date('Y-m-d H:i:s').&amp;quot;, &amp;quot;.$value['total'].&amp;quot; results\n&amp;quot;;&lt;br /&gt;
       echo &amp;quot;\tProduct's currency\t\t\t\t\t\tCustomer's currency\n&amp;quot;;&lt;br /&gt;
       echo &amp;quot;TLD\tCurrency\tCreate\tTransfer\tRenew\tTrade\t\tCurrency\tCreate\tTransfer\tRenew\tTrade\n&amp;quot;;&lt;br /&gt;
     }&lt;br /&gt;
 &lt;br /&gt;
     foreach ($value['results'] as $data) {&lt;br /&gt;
       echo&lt;br /&gt;
         $data['name'].&amp;quot;\t&amp;quot;.&lt;br /&gt;
         $data['prices']['resellerPrice']['product']['currency'].&amp;quot;\t&amp;quot;.&lt;br /&gt;
         $data['prices']['resellerPrice']['product']['price'].&amp;quot;\t&amp;quot;.&lt;br /&gt;
         $data['prices']['transferPrice']['product']['price'].&amp;quot;\t&amp;quot;.&lt;br /&gt;
         $data['prices']['renewPrice']['product']['price'].&amp;quot;\t&amp;quot;.&lt;br /&gt;
         ($data['tradeAvailable'] ? $data['prices']['tradePrice']['product']['price'] : '-').&amp;quot;\t&amp;quot;.&lt;br /&gt;
         &amp;quot;\t&amp;quot;.&lt;br /&gt;
         $data['prices']['resellerPrice']['reseller']['currency'].&amp;quot;\t&amp;quot;.&lt;br /&gt;
         $data['prices']['resellerPrice']['reseller']['price'].&amp;quot;\t&amp;quot;.&lt;br /&gt;
         $data['prices']['transferPrice']['reseller']['price'].&amp;quot;\t&amp;quot;.&lt;br /&gt;
         $data['prices']['renewPrice']['reseller']['price'].&amp;quot;\t&amp;quot;.&lt;br /&gt;
         ($data['tradeAvailable'] ? $data['prices']['tradePrice']['reseller']['price'] : '-').&amp;quot;\t&amp;quot;.&lt;br /&gt;
         &amp;quot;\n&amp;quot;;&lt;br /&gt;
 &lt;br /&gt;
       //print_r($data);&lt;br /&gt;
     }&lt;br /&gt;
     $offset += $limit;&lt;br /&gt;
   } while ($value['total'] &amp;gt; $offset &amp;amp;&amp;amp; $offset &amp;lt; 5000); // build in a safe max, just in case&lt;br /&gt;
 &lt;br /&gt;
 ?&amp;gt;&lt;/div&gt;</description>
			<pubDate>Tue, 12 Jan 2016 13:24:58 GMT</pubDate>			<dc:creator>WikiSysop</dc:creator>			<comments>https://doc.openprovider.eu/Talk:Retrieve_full_price_list</comments>		</item>
	</channel>
</rss>