Problem with RSS feed php code

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
anushakingsly
Forum Newbie
Posts: 2
Joined: Wed Jan 21, 2009 6:27 am

Problem with RSS feed php code

Post by anushakingsly »

Hai,
I am having some php script to get rss feeds in my webpage. The problem is, it is not working in all the systems which has wamp server. I tested that code with few machines using the same local server. But I'm getting the error XML error: Invalid document end at line1 in few systems. I don't know why? If anybody know the reason, pls guide me.

If u want I can give the code.

Thanks in advance,
Anusha.
User avatar
Burrito
Spockulator
Posts: 4715
Joined: Wed Feb 04, 2004 8:15 pm
Location: Eden, Utah

Re: Problem with RSS feed php code

Post by Burrito »

if it works on some machines but not others, check the configuration differences between the environments. There's bound to be something different between them...
anushakingsly
Forum Newbie
Posts: 2
Joined: Wed Jan 21, 2009 6:27 am

Re: Problem with RSS feed php code

Post by anushakingsly »

Hi Friend,
Thanku for u r reply.
Basically I'm a dotnet programmer. I don't know much about PHP. I created a product using dotnet which will create php website dynamically.
Using my app. I created the php site and it works fine. Now I want rss feed to be there in the generated website.

The rss code includes the curl function

Code: Select all

function getFeed(){
        // if we have a URL
        if ($this->url){
            if (extension_loaded('curl')) {
                $this->xml=$this->getRemoteFile($this->url);
            }
        }
    }
Now I included the curl ini file and its working fine if I run that file separately in my local wamp server.
But it's not working if I include that file in my php page where I want the script

Code: Select all

<?php include('RSS_FEEDS/index.php'); ?>
Can u tell me why?

Thanks
Anusha.
Post Reply