I dont know much about this topic. I have a feed that runs everyday. Its been running fine for months until yesterday, it threw the error (in the output xml document):
<b>Warning</b>: simplexml_load_string(): Entity: line 93191: parser error : Entity 'frasl' not defined in <b> folderpath
<b>Warning</b>: simplexml_load_string(): <g:color>Gold &frasl; White</g:color> in
Having had a look in the feed document theres a ⁄
(this is whats causing all the problem I think, its the first time I have seen it in out source doc using which the feeds are made) component which is simply a forward slash /
. I had a look online on this issue and this is the answer I deemed appropriate:
The code I now have is:
function sxe($feed)
{
$feed = file_get_contents($feed);
foreach ($http_response_header as $header)
{
if (preg_match("⁄", $header, $m))
{
switch (strtolower($m[1]))
{
case 'utf-8':
// do nothing
break;
case 'iso-8859-1':
$feed = utf8_encode($feed);
break;
default:
$feed = iconv($m[1], 'utf-8', $feed);
}
break;
}
}
return simplexml_load_string($feed);
}
I changed it a bit to suit my needs. That outputs errors in the xml:
1) It swaps the character <
to <
, >
to >
and "
to "
.
2) The errors are:
Undefined variable: http_response_header in <b> folderpath
Invalid argument supplied for foreach() in <b> folderpath
Anyone know what I can do to resolve the issue?