Forum

Atom links do not work

2011-05-25 14:20:55

sportbilly

Hi, thank you for a great script! I have a problem though, i have installed the universal reader and when the rss type is atom, the link is not working. it shows the titles and description but the link is the my website's url, it's like the value it gets is wrong. any ideas on how to fix it? cheers
2011-05-26 01:50:07

scriptol

Hello can you provide the URL of the feed so I can check it?
2011-05-26 05:08:05

sportbilly

hi again, i have problems with these urls that i think are Atom, correct me if I am wrong! they are in greek but that is not the problem zougla.gr/ArticleRss.xml feeds.feedburner.com/eAnagnostis?format=xml
2011-05-26 12:32:18

scriptol

There are Atom feeds, but the second has a sophisticated code. It have tried the first on this test page: http://www.scriptol.com/rss/atom-single.php It works. The second does not work. It tried this code on the second:
<?php
$url="http://feeds.feedburner.com/eAnagnostis?format=xml";
$hnd=curl_init();
curl_setopt($hnd,CURLOPT_CONNECTTIMEOUT,5);
curl_setopt($hnd,CURLOPT_URL,$url);
$page=curl_exec($hnd);
curl_close($hnd);
$doc=new DOMDocument();
$doc->loadXML($page);
echo $doc->saveXML();
?>
The feed is loaded. I have to look further in the code, maybe replace this code:
$doc  = new DOMDocument();
$doc->load($url);
by the curl code above to make it working.
2011-05-26 12:33:31

sportbilly

I'm using the Universal Reader, the problem is there, please try this link with the universal Reader
2011-05-26 12:39:26

scriptol

I have tried the Universal Reader too. It is the same, problem to access the feed with DOMDocument.
2011-05-26 12:40:28

sportbilly

is there a solution?
2011-05-26 12:48:33

scriptol

I have tried the curl code in Universal Reader.
$Universal_FeedArray = array();
$hnd=curl_init();
curl_setopt($hnd,CURLOPT_CONNECTTIMEOUT,5);
curl_setopt($hnd,CURLOPT_URL,$url);
$page=curl_exec($hnd);
curl_close($hnd);
$Universal_Doc=new DOMDocument();
$Universal_Doc->loadXML($page);
The feed is loaded, but not properly formatted. I do not know if PHP is able to parse a such file. If you can display other feed and not this one, the answer is no.
2011-05-26 13:30:31

sportbilly

Both the links I have you, work fine with atom single, is there a script to check if the feed are rss of atom and use which ever is better? thanks for the help
2011-05-27 13:16:06

scriptol

The common RSS readed works in this way. It check the file and choose the right decoder. Common RSS Reader
2011-05-27 18:34:02

sportbilly

this works fine with everything!! thanks a lot!