dcsimg
A Flash Developer Resource Site

Results 1 to 11 of 11

Thread: Xml Rss News

  1. #1
    KoolMoves Moderator blanius's Avatar
    Join Date
    Jul 2001
    Location
    Atlanta GA
    Posts
    5,244

    Xml Rss News

    I finally got it working!!!

    This should read any RSS 9.0 feed

    http://bretlanius.com/flash/newsxml.html

    Source not yet ready for release

    Ok this is wierd... It works fine locally but not on hosted site???? Very strange
    Last edited by blanius; 03-17-2004 at 02:00 PM.

  2. #2
    KoolMoves Moderator blanius's Avatar
    Join Date
    Jul 2001
    Location
    Atlanta GA
    Posts
    5,244
    Ah I've learned that you cannot pull XML data across domains.

    It works lovely on local machine


    You may notice it seems to be working but that version the first feed is a copy of a RSS feed that resides locally on my server. That's why the buttons don't work.

  3. #3
    KoolMoves Moderator blanius's Avatar
    Join Date
    Jul 2001
    Location
    Atlanta GA
    Posts
    5,244

    OK here we go

    This is the Source file and the final (for now) version.

    You can run this locally on your HD and it works really well. I'm doing some experimenting with PHP to see if I can get it to retrieve the XML and serve it up to the flash to solve the cross domain issue that flash cannot handle.

    http://bretlanius.com/flash/newsxml.movie
    http://bretlanius.com/flash/newsxml.html
    http://bretlanius.com/flash/newsxml.swf

  4. #4
    KoolMoves Moderator blanius's Avatar
    Join Date
    Jul 2001
    Location
    Atlanta GA
    Posts
    5,244
    Well someone finally helped me get PHP to pass an XML file from a remote server so this now works online...

  5. #5
    A Senior Newbie - How Odd ForumNewbie's Avatar
    Join Date
    Mar 2003
    Posts
    590
    Hi Brett,

    Any chance of reposting the source for this XML reader?

    Thanks,

    Morgan
    Please note that my domain has changed to http://www.morganmultinational.com

  6. #6
    KoolMoves Moderator blanius's Avatar
    Join Date
    Jul 2001
    Location
    Atlanta GA
    Posts
    5,244
    links are good now. Again there are issues with trying to get data from remote servers in Flash.

  7. #7
    A Senior Newbie - How Odd ForumNewbie's Avatar
    Join Date
    Mar 2003
    Posts
    590
    Great.

    Many thanks. Any chance of a clue as to what PHP script you used to pull in the XML?

    I have some ideas, but am having trouble with my PHP server. If you have something that already works, it would save me a little time.

    Thanks again,

    Morgan.
    Please note that my domain has changed to http://www.morganmultinational.com

  8. #8
    KoolMoves Moderator blanius's Avatar
    Join Date
    Jul 2001
    Location
    Atlanta GA
    Posts
    5,244
    I didn't have much success with pulling the RSS in through the PHP. The Flash works great locally on my desktop though no PHP required.

  9. #9
    A Senior Newbie - How Odd ForumNewbie's Avatar
    Join Date
    Mar 2003
    Posts
    590
    Managed to get connected to my PHP server for just long enough to convert Bret's streaming RSS - XML reader to work across domains:

    Bret's XML News Streamer (Now works across Domains)

    Thanks for your help Bret.

    I'll extract the bits I need now for my purposes, and post the PHP script that I had to use as soon as I can get connected again. It was basically just an 'fopen' and 'print' with a little gubbins around it. I'm not sure why the help button is a little temperamental though.

    Morgan.
    Last edited by ForumNewbie; 04-08-2005 at 06:32 PM.
    Please note that my domain has changed to http://www.morganmultinational.com

  10. #10
    A Senior Newbie - How Odd ForumNewbie's Avatar
    Join Date
    Mar 2003
    Posts
    590
    Darn it!

    I'd hoped to be able to view this on a pocket PC using GPRS or wireless. Doesn't work for some reason. Back to the drawing board.

    Morgan
    Please note that my domain has changed to http://www.morganmultinational.com

  11. #11
    A Senior Newbie - How Odd ForumNewbie's Avatar
    Join Date
    Mar 2003
    Posts
    590
    OK. Fully working now. I had a firewall issue with the PHP server, and then a Flash Player problem with the Pocket PC, but it's working now. Here's the PHP script I used to pull the RSS across domains, where page is the URL of the desired RSS feed:

    PHP Code:
    <?php
    $webpage 
    $_GET['page'];
    if (!
    $webpage)
        {
        
    $webpage ="http://www.microsite.reuters.com/rss/uk/topNews";
        }
    $fp fopen$webpage"r" ) or die("couldn't open $webpage");
    while ( ! 
    feof$fp ))
    print 
    fgets$fp1024 );
    ?>
    Thanks again for the help Bret.

    Morgan.
    Please note that my domain has changed to http://www.morganmultinational.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center