<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[FrontAccounting forum — oanda.com forex rates]]></title>
	<link rel="self" href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=8241&amp;type=atom" />
	<updated>2019-06-26T02:35:08Z</updated>
	<generator>PunBB</generator>
	<id>https://frontaccounting.com/punbb/viewtopic.php?id=8241</id>
		<entry>
			<title type="html"><![CDATA[oanda.com forex rates]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=35308#p35308" />
			<content type="html"><![CDATA[<p>Here is a code snippet that redirects to a page with the necessary forex rate but we need to capture the redirection in curl.<br /></p><div class="codebox"><pre><code>&lt;?php
$from_curr = &#039;USD&#039;;
$to_curr = &#039;SGD&#039;;
$on_date = date(&#039;Y-m-d&#039;);
$form = &lt;&lt;&lt;EOT
&lt;form method=&quot;post&quot; action=&quot;https://www1.oanda.com/currency/converter/&quot; id=&quot;ncc_detail_form&quot;&gt;
&lt;input type=&quot;hidden&quot; name=&quot;quote_currency_0&quot; id=&quot;form_quote_currency_hidden&quot; value=&quot;$from_curr&quot; /&gt;
&lt;input type=&quot;hidden&quot; name=&quot;quote_amount&quot; id=&quot;form_quote_amount_input_hidden&quot; value=&quot;1&quot; /&gt;
&lt;input type=&quot;hidden&quot; name=&quot;base_currency&quot; id=&quot;form_base_currency_hidden&quot; value=&quot;$to_curr&quot; /&gt;
&lt;input type=&quot;hidden&quot; name=&quot;base_amount&quot; id=&quot;form_base_amount_input_hidden&quot; value=&quot;&quot; /&gt;
&lt;input type=&quot;hidden&quot; name=&quot;last_action&quot; id=&quot;form_last_action_hidden&quot; value=&quot;&quot; /&gt;
&lt;input type=&quot;hidden&quot; name=&quot;interbank_rates&quot; id=&quot;form_interbank_rates_hidden&quot; value=&quot;0&quot; /&gt;
&lt;input type=&quot;hidden&quot; name=&quot;end_date&quot; id=&quot;form_end_date_hidden&quot; value=&quot;$on_date&quot; /&gt;
&lt;input type=&quot;hidden&quot; name=&quot;language&quot; id=&quot;form_language_hidden&quot; value=&quot;en&quot; /&gt;
&lt;input type=&quot;hidden&quot; name=&quot;view&quot; id=&quot;form_view_hidden&quot; value=&quot;details&quot; /&gt;
&lt;input type=&quot;submit&quot; id=&quot;submit&quot; name=&quot;submit&quot; value=&quot;Submit&quot; /&gt;
&lt;/form&gt;
EOT;
echo $form;
?&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
window.onload = function(){
  document.getElementById(&#039;submit&#039;).click();
}
&lt;/script&gt;</code></pre></div><p>Even the Submit button can be &quot;hidden&quot;.</p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2019-06-26T02:35:08Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=35308#p35308</id>
		</entry>
</feed>
