Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
RSS Reading Kinda Works, Help
Old 07-25-2008, 01:10 AM RSS Reading Kinda Works, Help
Galaxian's Avatar
Rich Powell

Posts: 842
Name: Rich Powell
Location: United Kingdom
Trades: 0
This RSS reader script I'm using works with some RSS feeds however, it has trouble with feeds like this:

http://www.lineage.com/news/atom.xml

Example of one that works is:

http://feeds.feedburner.com/aionnewsen?format=xml

Code is:

PHP Code:
function RSS_RetrieveLinks($url)
{
    global 
$RSS_Content;

    
$doc  = new DOMDocument();
    
$doc->load($url);

    
$channels $doc->getElementsByTagName("channel");
    
    
$RSS_Content = array();
    
    foreach(
$channels as $channel)
    {
        
$items $channel->getElementsByTagName("item");
        foreach(
$items as $item)
        {
            
$y RSS_Tags($item1);    // get description of article, type 1
            
array_push($RSS_Content$y);
        }
         
    }

}


function 
RSS_Links($url$size)
{
    global 
$RSS_Content$cellbg2;

    
$page "";

    
RSS_RetrieveLinks($url);
    if(
$size 0)
        
$recents array_slice($RSS_Content0$size);

    foreach(
$recents as $article)
    {
        
$type $article["type"];
        if(
$type == 0) continue;
        
$title $article["title"];
        
$link $article["link"];
        
$page .= "<tr><td".(($count 2)? " style=\"background: #".$cellbg2.";\"":"")."><a href=\"".$link."\">".$title."</a></td></tr>\n";
        
$count ++;            
    }

    return 
$page;
    

Suggestions?
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE

Please help get the new
Please login or register to view this content. Registration is FREE
forum started for Webmasters like you!

Galaxian is offline
Reply With Quote
View Public Profile Visit Galaxian's homepage!
 
 
Register now for full access!
Old 07-28-2008, 02:44 PM Re: RSS Reading Kinda Works, Help
Galaxian's Avatar
Rich Powell

Posts: 842
Name: Rich Powell
Location: United Kingdom
Trades: 0
*sigh* bump
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE

Please help get the new
Please login or register to view this content. Registration is FREE
forum started for Webmasters like you!

Galaxian is offline
Reply With Quote
View Public Profile Visit Galaxian's homepage!
 
Old 08-11-2008, 09:56 AM Re: RSS Reading Kinda Works, Help
Skilled Talker

Posts: 61
Trades: 0
Try Magpie RSS...

I've used it twice and never had a problem. And yes it works with atom feeds.

Pod.
just_a_pod is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to RSS Reading Kinda Works, Help
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.17328 seconds with 12 queries