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

Different actions for different parts of a string
<?php
function dosomething($string, $else = '') {
if (empty($else))
$string

how to load php class from another domain?
how to load php class from another domain?

add to sql result
ok see rite now my sites hit counter is counted from the mysql visitor log i need to clear it aft

Find current logon time
Hi,
in my sql script i want to query and find out the logon time of the current session.
<

Form always sends to error page...
Hello,
Any help will be greatly appreciated. I am having trouble getting multiple fields to be re

Random date selection
i want to select random date with time(hour+minutes+sec) where date is specified(10/22/2009) and tim

How to Handle more than one submit button in single form?
Hi
I have one PHP file which contains one Form. In this form there are two Submit type Buttons

Can't get the unicode character
I'm trying to get some text from various parts of a file. I have converted the file to hex (bin2hex)

modifying query string with no page refresh
Hi everybody,
I've tried to get info about my problem all over the internet but i didn't find out

Filtering Tables
Hello Thanks for any help any one can give Im very new to PHP..

I need to pull data for clien

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