SitePoint Sponsor

User Tag List

Results 1 to 9 of 9
  1. #1
    SitePoint Zealot infoxicated's Avatar
    Join Date
    Jun 2001
    Location
    UK
    Posts
    140
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    XML / RSS feed question...

    I've tried out a number of examples on the net, dealing with parsing and displaying feeds. However, I always seem to end up with a similar error regardless of which example I follow:

    PHP Code:
    Warningphp_hostconnectconnect failed in c:\program files\apache group\apache\htdocs\intdev\xmltest3.php on line 16

    Warning
    fopen("http://www.sitepoint.com/rss.php""r") - Bad file descriptor in c:\program files\apache group\apache\htdocs\intdev\xmltest3.php on line 16
    Error reading RSS data

    Can anyone think of anything obvious I'd be doing wrong that causes the php script to fail upon opening the feed?

    TIA

  2. #2
    SitePoint Zealot infoxicated's Avatar
    Join Date
    Jun 2001
    Location
    UK
    Posts
    140
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Anyone?

    Harry?

    Larry?

    (Always wanted to post that one )

  3. #3
    SitePoint Zealot infoxicated's Avatar
    Join Date
    Jun 2001
    Location
    UK
    Posts
    140
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I guess this is a toughie - any chance of anyone at Sitepoint doing a fresh article on this? - I cant be the only one experiencing problems with setting it up.

  4. #4
    Probably eating pie mitsubishi's Avatar
    Join Date
    Sep 2001
    Location
    England, UK
    Posts
    405
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you have PHP < 4.0.3 you need fopen wrappers compiled in. If you have an upto date version check 'allow_url_fopen' is set to on in your php.ini.
    Also you might want to check that your firewall isn't blocking the connection!

  5. #5
    SitePoint Zealot infoxicated's Avatar
    Join Date
    Jun 2001
    Location
    UK
    Posts
    140
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for those pointers, mate - I'll check out all the above - although just this evening I did get one script to run on the bbc news feed.

    Oh, and has Keane lost the plot or what?

  6. #6
    Probably eating pie mitsubishi's Avatar
    Join Date
    Sep 2001
    Location
    England, UK
    Posts
    405
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by infoxicated
    Oh, and has Keane lost the plot or what?
    Don't think Keane ever found the plot in the first place! Hopefully his suspension will give Veron the chance to prove he wasn't the biggest waste of money in the history of the game

  7. #7
    SitePoint Zealot infoxicated's Avatar
    Join Date
    Jun 2001
    Location
    UK
    Posts
    140
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The problem is, he's going for the op while he's out, so to him it wont even be like he's suspended - he'll learn nothing from it. (Not that I suspect he would anyway).

    He does need to be reeled in somewhat, though - look at Cantona - banned for an ice age and when he came back he was one of the greatest players in the game.

    Erm... apologies to everyone who thought this would be a development issue!

  8. #8
    SitePoint Wizard gold trophysilver trophy
    Join Date
    Nov 2000
    Location
    Switzerland
    Posts
    2,479
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Anyone?

    Harry?

    Larry?


    I don't think that problem is your script but rather the remote rss feed. Been noticing some problems with it recently and also some RSS parsers complain it's not well formed XML (haven't found the problem yet).

    The main issue is the article encourages use of fopen() to access the file, rather than fsockopen(), which has timeouts and better error handling.

    My tip there is head to phpclasses.org, pick up the advanced HTTP client then use this class to fetch the XML from Sitepoint.

  9. #9
    SitePoint Zealot infoxicated's Avatar
    Join Date
    Jun 2001
    Location
    UK
    Posts
    140
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Cheers Harry


Bookmarks

Posting Permissions

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