Reputation: 1683
I get this error on host with simplepie 1.3.1:
A feed could not be found at http://pop-music.ir/feed. A feed with an invalid mime type may fall victim to this error, or SimplePie was unable to auto-discover it.. Use force_feed() if you are certain this URL is a real feed.
but on localhost(xampp) I can view rss
UPDATED (2013/July/22 - 1:24 PM):
I've uploaded full simplepie files.download My source codes
on this file, in \simplepie\demo\1.php
, I set this code:
<?php
include_once('../autoloader.php');
include_once('../idn/idna_convert.class.php');
$feed = new SimplePie();
$feed->set_feed_url('http://pop-music.ir/feed');
$feed->force_feed(true);
$feed->init();
$feed->handle_content_type();
echo $feed->get_title();
?>
But in the run-time error is not displayed and not RSS is checked!
When I check url rss like this http://pop-music.ir/feed
on my script, I get error bu when check this url in demo simplepie (view demo this url) I can view rss!!!!
Help me :(
Upvotes: 0
Views: 5312
Reputation: 2032
If this works on your localhost and not your live server then it could be that you have a different configuration setup or modules loaded. I know for me I just didn't have the libphp-simplepie
module installed.
If you have ssh access to your host you can install it manually.
Ubuntu
sudo apt-get install libphp-simplepie
You will have to confirm the download by typing 'Y' Then you will need to restart apache for the changes to take effect
This was for an Ubuntu server if you have another server such as CentOS the process could be different. I just haven't tested it on another OS. This worked for me and maybe it will work for others.
Upvotes: 0
Reputation: 2109
Ty using force_feed()
as suggested and see if it works. http://simplepie.org/wiki/reference/simplepie/force_feed
Upvotes: 2