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.

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

unserialize help, getting errors
hi all ,
I got a form with 6 fields (2 input and 4 select box), when the page loads one block is

PHP Thumbnail Creation
Ok so i use this function to create thumbnails:

Code: function createthumb($name,$filename,$n

$_POST variable un-useable
I'm trying to use a $_POST variable in a mysql update statement but i can't use it for some unknown

read integers that returns a negative or prints the average
Im trying to finish this homework assignment by tommarow afternoon and I keep getting stuck.
Wr

dropdown box help - open php files to textarea
Hi, I am using tinymce to edit content located in several php files. The code I attached works but i

selectbox+database connection retrive problem
Code: [Select]
<tr>
<th align="left" scope="c

IP Based Cron Jobs
I run cronjobs on my website. After one of my visitors got curious and tinkered around he realized h

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

How to give the privillege for triggers?
Hi,

How to give the privillage for triggers to particular user?

Please let me

Implementing Single Sign-On using SAML 1.1, x.509, LDAP in C#.net
Hi, I got a requirement from the client i.e implementing single sing on using SAML 1.1( LDAP &

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