for currency conversion i have used a link and used in code $url="http://www.google.com/finance/converter?a=$amount&from=$currFrom&to=$currInto";
function getHtmlCodeViaFopen($url)
{
$ci =& get_instance();
$returnStr="";
$default_currency_code=$ci->config->item('default_currency_code');
if($default_currency_code!="USD")
{
$fp=fopen($url, "r") or die("ERROR: Failed to open $url for reading via this script.");
while (!feof($fp)) {
$returnStr.=fgetc($fp);
}
fclose($fp);
return $returnStr;
}
now the url not responding in my server but works fine in my url i used preg match to retrieve the characters from that url
It shows the die error ERROR: Failed to open http://www.google.com/finance/converter?a=40&from=USD&to=USD for reading via this script. Thanks in advance.