- Code: Select all
An error occured during parsing XML data.
An error occured during parsing XML data.
;extension=php_curl.dll
extension=php_curl.dll
Hi
Please check if you have cURLS extension enable on your php.ini file.
Find
- Code: Select all
;extension=php_curl.dll
and change to
- Code: Select all
extension=php_curl.dll
Contact your host provider if you don't have access.
Also it's fundamental that you set full permissions (777) for cache directory and for file mod_gk_weather.xml
Cheers
Are you sure you have 777 permissions on mod_gk_weather.xml?
What version of joomla and PHP version are u using?
(Be objective on which version of PHP5)
$current_conditions = $xml->document->weather[0]->current_conditions[0];
<?xml version="1.0"?><xml_api_reply version="1"><weather module_id="0" tab_id="0" mobile_row="0" mobile_zipped="1" row="0" section="0" ><forecast_information><city data="Cabras, Sardinia"/><postal_code data="Cabras,Sardinia"/><latitude_e6 data=""/><longitude_e6 data=""/><forecast_date data="2010-07-15"/><current_date_time data="2010-07-15 09:55:00 +0000"/><unit_system data="SI"/></forecast_information><current_conditions><condition data="Parzialmente nuvoloso"/><temp_f data="88"/><temp_c data="31"/><humidity data="Umidit?: 79%"/><icon data="/ig/images/weather/partly_cloudy.gif"/><wind_condition data="Vento: E a 19 km/h"/></current_conditions><forecast_conditions><day_of_week data="gio"/><low data="22"/><high data="29"/><icon data="/ig/images/weather/sunny.gif"/><condition data="Chiaro"/></forecast_conditions><forecast_conditions><day_of_week data="ven"/><low data="23"/><high data="31"/><icon data="/ig/images/weather/sunny.gif"/><condition data="Chiaro"/></forecast_conditions><forecast_conditions><day_of_week data="sab"/><low data="23"/><high data="30"/><icon data="/ig/images/weather/sunny.gif"/><condition data="Chiaro"/></forecast_conditions><forecast_conditions><day_of_week data="dom"/><low data="21"/><high data="28"/><icon data="/ig/images/weather/sunny.gif"/><condition data="Chiaro"/></forecast_conditions></weather></xml_api_reply>
<humidity data="Umidit[color=#BF0000]?[/color]: 79%"/>
function XMLEntities($string)
{
$string = preg_replace('/[^x09x0Ax0Dx20-x7F]/e', '$this->_privateXMLEntities("$0")', $string);
return $string;
}
function _privateXMLEntities($num)
{
$chars = array(
128 => '€',
130 => '‚',
131 => 'ƒ',
132 => '„',
133 => '…',
134 => '†',
135 => '‡',
136 => 'ˆ',
137 => '‰',
138 => 'Š',
139 => '‹',
140 => 'Œ',
142 => 'Ž',
145 => '‘',
146 => '’',
147 => '“',
148 => '”',
149 => '•',
150 => '–',
151 => '—',
152 => '˜',
153 => '™',
154 => 'š',
155 => '›',
156 => 'œ',
158 => 'ž',
159 => 'Ÿ');
$num = ord($num);
return (($num > 127 && $num < 160) ? $chars[$num] : "&#".$num.";" );
}
if($xml->loadString($this->content))
if($xml->loadString($this->XMLEntities($this->content)))
Hi
Great Thank You for Your help.
<HTML><HEAD><meta http-equiv="content-type" content="text/html;charset=utf-8">
<TITLE>302 Moved</TITLE></HEAD><BODY>
<H1>302 Moved</H1>
The document has moved
<A HREF="http://sorry.google.com/sorry/?continue=http://www.google.com/ig/api%3Fweather%3DCraiova,%2520RO%26hl%3Dro">here</A>.
</BODY></HTML>
Warning: filesize() [function.filesize]: stat failed for /var/www/cache/mod_gk_weather.xml in /var/www/modules/mod_gk_weather/helper.php on line 182
An error occured during parsing XML data. Please try again.
Warning: filesize() [function.filesize]: stat failed for /var/www/cache/mod_gk_weather.xml in /var/www/modules/mod_gk_weather/helper.php on line 136
<HTML><HEAD><meta http-equiv="content-type" content="text/html;charset=utf-8">
<TITLE>302 Moved</TITLE></HEAD><BODY>
<H1>302 Moved</H1>
The document has moved
<A HREF="http://sorry.google.com/sorry/?continue=http://www.google.com/ig/api%3Fweather%3DCabras,Sardinia%26hl%3Dit">here</A>.
</BODY></HTML>