Crazy RSS & PHP Action Tyme

Discussion in 'Web Design and Development' started by dpaanlka, Feb 7, 2008.

  1. dpaanlka macrumors 601

    dpaanlka

    Joined:
    Nov 16, 2004
    Location:
    Illinois
    #1
    OK so I'm bashing my head in here over this situation I'm having.

    I have two different RSS feeds being generated from my forum by two different versions of the same PHP script (one really old and one current).

    Then, on another server, I have two PHP scripts that are supposed to take RSS feeds and put them into an HTML page to be displayed by a browser. They are identical, the only difference being one points to one of my previously mentioned RSS feeds, and the other points to the other.

    The only thing is, one works fine while the other fails.

    http://www.info-mac.org/index.php pulls the feed located at http://forums.info-mac.org/rss.php and works just fine - this is the old version of the RSS generating script.

    http://www.info-mac.org/index2.php which is exactly the same as the above index.html with exception that it pulls the feed located at http://forums.info-mac.org/news.php and fails with a few XML errors - this is the current version of the RSS generating script which I need for some special extra features it has - eventually I'd like to replace the earlier older script with this current script, but I can't do that yet because it doesn't work right - even though the RSS feed itself looks and functions just fine!

    I tried comparing the two XML output sources in Safari but they look really close. Somebody mentioned it might be some sort of encoding problem but I don't know what I'm looking at. I'm surprised I've gotten this far I've just been figuring it out as I go.

    Any help would be appreciated.
     
  2. macgruder macrumors 6502

    Joined:
    Oct 29, 2007
    Location:
    UK
    #2
    I'm guessing the issue is pretty straightforward, yet tricky to spot.

    What look like spaces in your files are not actually spaces but 'gremlins' of some sort.

    See the image below where the question marks appear. What you need to do is open the file in a good editor like BBEdit that can view invisibles and simply replace those 'gremlins' with true spaces. A copy of one gremlin, and a search and replace might do the trick. Or just delete before the '<' on each line, and retype.
     

    Attached Files:

  3. dpaanlka thread starter macrumors 601

    dpaanlka

    Joined:
    Nov 16, 2004
    Location:
    Illinois
    #3
    Oh wow - you're right that did it! Simple problem, very difficult to spot!
     
  4. macgruder macrumors 6502

    Joined:
    Oct 29, 2007
    Location:
    UK
    #4
    I'm glad someone appreciates me :)
    Glad it solved your problem.
     

Share This Page