Auto Update Currencies
#21
Posted 10 January 2009 - 03:13 PM
Jack
Most Important: Header Tags SEO - Ultimate SEO V 2.2d
All SEO Addons: Recommended SEO Addons
Support Links:
Finding relevant link exchanges - Headers Already Sent - What does it cost? -What's my version? - How to change titles? - Preventing HotLinking
#23
Posted 10 January 2009 - 05:45 PM
Jack_mcs, on Jan 10 2009, 11:13 AM, said:
Jack
Yes. You were right.
My hosts says "The PHP parameter allow_url_fopen has been disabled in both our PHP4 and PHP5 environments"
"If enabled, allow_url_fopen allows PHP's file functions to retrieve data from remote locations such as an FTP server or web site, and could lead to code injection vulnerabilities. Typically these code injection vulnerabilities occur from improper input filtering when passing user-provided data to PHP functions. Disabling this function will help considerably in stopping your site(s) from being compromised, as well as help thwart the unauthorized use of our servers for abusive or malicious purposes."
I am still adding this info here in case some other people have the same problem.
#24
Posted 10 January 2009 - 05:57 PM
Jack
Most Important: Header Tags SEO - Ultimate SEO V 2.2d
All SEO Addons: Recommended SEO Addons
Support Links:
Finding relevant link exchanges - Headers Already Sent - What does it cost? -What's my version? - How to change titles? - Preventing HotLinking
#25
Posted 11 February 2009 - 04:50 PM
Thanks
WWW.Anniedays.2ya.com
#26
Posted 25 March 2009 - 04:37 PM
I've made the code change you suggested (return $nhours; instead of return $ndays;). I have 'HOURS_BETWEEN_UPDATES' , '12' and the Cron job set to 4 hours. It still seems to be unreliable in updating currencies. Sometimes updating and other times claiming it was updated within the specified period when I know it was not.
Ken
#27
Posted 25 March 2009 - 05:20 PM
Jack
Most Important: Header Tags SEO - Ultimate SEO V 2.2d
All SEO Addons: Recommended SEO Addons
Support Links:
Finding relevant link exchanges - Headers Already Sent - What does it cost? -What's my version? - How to change titles? - Preventing HotLinking
#28
Posted 26 March 2009 - 10:37 AM
Jack_mcs, on Mar 25 2009, 05:20 PM, said:
Jack
It seems odd that I have three currencies to be updated. Sometimes the script says that two have been updated and one has not because it has been updated within the last time period. Since all three are subject to the same cron and script they should all either be updated or all stamped as updated at the same time shouldn't they?
Ken
#29
Posted 26 March 2009 - 11:20 AM
Jack
Most Important: Header Tags SEO - Ultimate SEO V 2.2d
All SEO Addons: Recommended SEO Addons
Support Links:
Finding relevant link exchanges - Headers Already Sent - What does it cost? -What's my version? - How to change titles? - Preventing HotLinking
#30
Posted 26 March 2009 - 11:38 AM
Jack_mcs, on Mar 26 2009, 11:20 AM, said:
Jack
Ah, fairy nuff.
#31
Posted 27 July 2009 - 01:03 PM
I am trying to use this contribution, but I don't understand the CRON job part.
Step 2: Add a cron job. The following syntax may not be correct for your server
(be sure to replace username). If not, you will need to contact your
host to get the correct syntax.
php /home/username/public_html/catalog/admin/auto_update_currencies.php
I never added a cron job, so I need a bit of more explanation. What do I do exactly? Do I fill this in into the address bar of my browser? php /home/username/public_html/catalog/admin/auto_update_currencies.php
My site is on a Apache server. The url is www.willy-condoms.com.
Hope someone can help!
Thanks in advance!
Regards,
Marleen
#32
Posted 27 July 2009 - 01:20 PM
Nic
#33
Posted 14 August 2009 - 04:19 PM
Anyone know tell me how to fix the problem?
Telecartofilia Cards Digers
Currencies Update Report
Currencies for Telecartofilia Cards Digers updated on Fri Aug 14 3:00:17 2009
The exchange rate for Real WAS NOT successfully updated. It was last updated on
The exchange rate for U.S.Dollar WAS NOT successfully updated. It was last updated on
The exchange rate for Euro WAS NOT successfully updated. It was last updated on
The exchange rate for British Pound WAS NOT successfully updated. It was last updated on
#34
Posted 14 August 2009 - 04:47 PM
Jack
Most Important: Header Tags SEO - Ultimate SEO V 2.2d
All SEO Addons: Recommended SEO Addons
Support Links:
Finding relevant link exchanges - Headers Already Sent - What does it cost? -What's my version? - How to change titles? - Preventing HotLinking
#35
Posted 26 October 2009 - 02:10 PM
Jack_mcs, on 16 December 2008 - 01:30 PM, said:
Jack
Hi Jack,
I installed currency update, but I keep on receiving emails saying:
US Dollar was not updated since it has been updated in the last 24 hours.
Euro was not updated since it has been updated in the last 24 hours.
Pounds was not updated since it has been updated in the last 24 hours.
Why is that? It has never worked.
Thanks,
Marleen
#36
Posted 26 October 2009 - 03:09 PM
$nhours = round($nseconds / 3600); // One hour has 3600 secondsto this
$nhours = round($nseconds / 3600) * (($ndays > 1) ? $ndays : 1); // One hour has 3600 seconds
Edited by Jack_mcs, 26 October 2009 - 03:10 PM.
Most Important: Header Tags SEO - Ultimate SEO V 2.2d
All SEO Addons: Recommended SEO Addons
Support Links:
Finding relevant link exchanges - Headers Already Sent - What does it cost? -What's my version? - How to change titles? - Preventing HotLinking
#37
Posted 05 December 2009 - 10:27 AM
Thanks for all your useful contribs. I having trouble [server side] that doesn't allow the Auto Update Currencies to work properly. Neither, when one clicks update currencies button from the adim section. I had to resolve this issue by altering the localization.php so that the admin/update currencies button, funtions as per following:-
<?php
function quote_oanda_currency($code, $base = DEFAULT_CURRENCY) {
$alte_url = "http://www.oanda.com/convert/fxdaily";
$alte_params = 'value=1&redirected=1&exch=' . $code . '&format=CSV&dest=Get+Table&sel_list=' . $base;
$alte_user_agent = "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)";
$alte_ch = curl_init();
curl_setopt($alte_ch, CURLOPT_POST,1);
curl_setopt($alte_ch, CURLOPT_POSTFIELDS,$alte_params);
curl_setopt($alte_ch, CURLOPT_URL,$alte_url);
curl_setopt($alte_ch, CURLOPT_SSL_VERIFYHOST, 2);
curl_setopt($alte_ch, CURLOPT_USERAGENT, $alte_user_agent);
curl_setopt($alte_ch, CURLOPT_RETURNTRANSFER,1);
curl_setopt($alte_ch, CURLOPT_SSL_VERIFYPEER, FALSE);
$alte_page=curl_exec ($alte_ch);
curl_close ($alte_ch);
$page = explode("\n",$alte_page);
$match = array();
preg_match('/(.+),(\w{3}),([0-9.]+),([0-9.]+)/i', implode('', $page), $match);
if (sizeof($match) > 0) {
return $match[3];
} else {
return false;
}
}
function quote_xe_currency($to, $from = DEFAULT_CURRENCY) {
$alte_url = "http://www.xe.net/ucc/convert.cgi";
$alte_params = 'Amount=1&From=' . $from . '&To=' . $to;
$alte_user_agent = "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)";
$alte_ch = curl_init();
curl_setopt($alte_ch, CURLOPT_POST,1);
curl_setopt($alte_ch, CURLOPT_POSTFIELDS,$alte_params);
curl_setopt($alte_ch, CURLOPT_URL,$alte_url);
curl_setopt($alte_ch, CURLOPT_SSL_VERIFYHOST, 2);
curl_setopt($alte_ch, CURLOPT_USERAGENT, $alte_user_agent);
curl_setopt($alte_ch, CURLOPT_RETURNTRANSFER,1);
curl_setopt($alte_ch, CURLOPT_SSL_VERIFYPEER, FALSE);
$alte_page=curl_exec ($alte_ch);
curl_close ($alte_ch);
$page = explode("\n",$alte_page);
$match = array();
preg_match('/[0-9.]+\s*' . $from . '\s*=\s*([0-9.]+)\s*' . $to . '/', implode('', $page), $match);
if (sizeof($match) > 0) {
return $match[1];
} else {
return false;
}
}
?>
This works very fine.
Could you instruct me how to amaned your contrib so that it could run as well, basis on the tips from the attached localization.php script.
With best regards
Proimage
#38
Posted 05 December 2009 - 11:26 AM
Most Important: Header Tags SEO - Ultimate SEO V 2.2d
All SEO Addons: Recommended SEO Addons
Support Links:
Finding relevant link exchanges - Headers Already Sent - What does it cost? -What's my version? - How to change titles? - Preventing HotLinking
#39
Posted 06 December 2009 - 03:44 PM
Thanks for your reply.
I always get this error, by email.
US Dollar was not updated since it has been updated in the last 24 hours.
Euro was not updated since it has been updated in the last 24 hours.
Canada Dollar was not updated since it has been updated in the last 24 hours.
Japan Yen was not updated since it has been updated in the last 24 hours.
United Kingdom Pound was not updated since it has been updated in the last 24 hours.
Australia Dollar was not updated since it has been updated in the last 24 hours.
Then I have to resolve to update the currencies manually by clicking the admin, localization currencies, update button and see that the rates did change.
Still troubling... wish I could have it working.
Regs Proimage
#40
Posted 06 December 2009 - 07:22 PM
$nhours = round($nseconds / 3600); // One hour has 3600 seconds $nseconds = $nseconds % 3600; $nminutes = round($nseconds / 60); // One minute has 60 seconds, duh! $nseconds = $nseconds % 60; return $ndays;with these
$nhours = round($nseconds / 3600) * (($ndays > 1) ? $ndays : 1); // One hour has 3600 seconds $nseconds = $nseconds % 3600; $nminutes = round($nseconds / 60); // One minute has 60 seconds, duh! $nseconds = $nseconds % 60; return $nhours;
Most Important: Header Tags SEO - Ultimate SEO V 2.2d
All SEO Addons: Recommended SEO Addons
Support Links:
Finding relevant link exchanges - Headers Already Sent - What does it cost? -What's my version? - How to change titles? - Preventing HotLinking









