simplexml_load_file and rss problem


Posted on 16th Feb 2014 07:03 pm by admin

Hi,

I have a problem parsing an rss feed using simplexml_load_file - this is strange as i have used the same code to parse literally 1000s of different feeds in the past, and even stranger in that if i put the feed source on our server as a .xml file then my code parses it successfully.

Did you know?Explore Trending and Topic pages for more stories like this.
The relevant code snippet:
$xml = simplexml_load_file("http://www.quidco.com/blog/?feed=rss2",'SimpleXMLElement', LIBXML_NOCDATA);

The errors i get are:
Warning: simplexml_load_file() [function.simplexml-load-file]: http://www.quidco.com/blog/?feed=rss2:1: parser error : Start tag expected, '<' not found in [my php script]
Warning: simplexml_load_file() [function.simplexml-load-file]: 2977 in [my php script]
Warning: simplexml_load_file() [function.simplexml-load-file]: ^ in [my php script]

Any ideas or suggestions will be much appreciated thanks
No comments posted yet

Your Answer:

Login to answer
161 Like 33 Dislike
Previous forums Next forums
Other forums

AutoChoosing a CSS file based on URL
Hey everyone,

I have a site that has multiple URLs and CSS files.

Based on the URL tha

SCO Unix
I know this might not be the place to ask, but, can anyone tell me if SCO Unix comes with PHP built

Array question
Does anyone know how to create a program that takes the $ amount for 8 different departments and gi

how to timeout $doc = new DOMDocument()->load($url)
I am currently using this $doc->load($url) to fetch an rss feed.
If a feed takes long than

Save username into DB
OkaY so I got my blog to actually save the posts and whatever, all I need now is for it to keep the

IP question
ive got 2 ip addresses both global from same user how would i detect if they are local to each other

Table sorting
Hi,

I'm trying to modify the following in order to make the output table sorted alphabeticall

preg_match logical error
Code: <?php
$s = file_get_contents("page.html");
preg_match('/<div cla

Help with search.php
Hello All

I need the search engine on a site I am building at the moment to display the searc

passing an array of objects after submit
How do I do this? This is what I have tried and it is not working.

<form method="

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash