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

Connection Timeout
I'm using xmii 12.0

I'm calling a transaction as a web service from a windows application

Help with PHP Calendar code...
Hello, I'm new to this forum and I'm glad I found it.
I wrote this code for a PHP calendar as an

How can use this array as a key?
Say I have this array for example:


print_r($array);

Prints:
Code: [Select]Array

javascript in php code causes page to display white
Hi All,

Odd one this, I've got the following code (below) which is a simple log in form. The

UTL File problem
Hi
I have a file in certain path with the following permissions (The file is a dummy file witho

can i optmize image to 50% quality before uploading 2 server
Hi there

i have jus written a php program to upload and display images but when i try to uplo

COde for a Cc
I'm not receiving $ft as a Cc. Why is that??

$to = "$email";
$headers = "Fr

the problem with str_replace
$str="hahahahahahahahahahahahahaha";
$nn=1;
$str=str_replace('ha','MyGod',$str,$nn);

I need some help with the IF command...
I have a large number of images in one section of my website with the .jpg format. I'm adding a bun

webpage with (simple) login & mysql-db
Hi all,

What I was looking for before was a multi-user password manager, web-based! The offer

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