Loading ...
Sorry, an error occurred while loading the content.

Re: [SimplePie] Feed URL appears to be modified

Expand Messages
  • Duane O'Brien
    Glad I could help. Can anyone that s officially working on SimplePie comment on this? ... --
    Message 1 of 8 , Jan 27, 2010
    View Source
    • 0 Attachment
      Glad I could help.

      Can anyone that's officially working on SimplePie comment on this?

      On Wed, Jan 27, 2010 at 11:47 AM, Josh Clark <joshclark17@...> wrote:


      THat did the trick! Thanks a ton! I'm not a hard-core developer and I would never have found that. Thanks again.

      josh

      On Jan 27, 2010, at 11:38 AM, Duane O'Brien wrote:

       

      I saw the same kind of issue, and posted a query about the issue a few
      days ago with no response. I have a suggestion that may help.

      In simplepie.inc, around line 2147, you should see the following function:

      function set_query($query)
      {
      if ($query === null || $query === '')
      {
      $this->query = null;
      }
      else
      {
      $this->query = $this->replace_invalid_with_pct_encoding($query,
      'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~!$\'()*+,;:@/?');
      }
      $this->valid[__FUNCTION__] = true;
      return true;
      }

      Change it to this:

      function set_query($query)
      {
      if ($query === null || $query === '')
      {
      $this->query = null;
      }
      else
      {
      $this->query = $query;
      }
      $this->valid[__FUNCTION__] = true;
      return true;
      }

      and see if it works. It looks to me like simplepie is replacing
      special characters in the query string, for reasons that I don't
      understand. Making this change is how I got mine to work.

      -D

      On Wed, Jan 27, 2010 at 11:33 AM, Joshua <joshclark17@...> wrote:
      > Hi there-
      >
      > I have a feed I'm trying to get working on a site. The address is:
      >
      > http://www.chabad.org/tools/rss/zmanim.xml?c=331
      >
      > The "?c=331" at the end of the xml is a locater for the RSS (which is a Feed telling when particular ethnic times are throughout the day). Without the "?c=331" the feed is useless as what it displays is this:
      >
      > http://new.wizofl.org/resources/daily_halachic_times/
      >
      > I've posted a couple of times, and not got a response (which is fine - I know we're all busy). I'm trying to wrap up this project though and need to know if simplepie is capable of handling this correctly.
      >
      > My code is :
      >
      > require_once('http://new.wizofl.org/inc/simplepie.inc');
      >
      > // We'll process this feed with all of the default options.
      > $feed = new SimplePie();
      >
      >  $feed->set_feed_url('http://www.chabad.org/tools/rss/zmanim.xml?c=331');
      >
      > // This makes sure that the content is sent to the browser as text/html and the UTF-8 character set (since we didn't change it).
      >
      > $feed->encode_instead_of_strip(false);
      > $feed->handle_content_type();
      > $feed->init();
      >
      > Any help would be extremely appreciated.
      >
      > Josh
      >
      >
      >
      > ------------------------------------
      >
      > Yahoo! Groups Links
      >
      >
      >
      >

      --
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      Ideas are good things to have even if they are old.






      --
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      Ideas are good things to have even if they are old.
    • Ryan Parman
      I don t think anybody is officially working on SimplePie anymore. The project is in low-power mode. There are one or two people doing minor maintenance, but
      Message 2 of 8 , Jan 27, 2010
      View Source
      • 0 Attachment
        I don't think anybody is "officially" working on SimplePie anymore. The project is in low-power mode.

        There are one or two people doing minor maintenance, but we're relying primarily on GitHub patches for fixing bugs and such.

        If the community believes that this is a valuable tool, then it will need to step up to fill the development gap. If nobody puts in the effort, then it will fall by the wayside.

        --
        Ryan Parman

        Please don't email/IM me directly. That's why we have a mailing list. ;)






        On Jan 27, 2010, at 11:50 AM, Duane O'Brien wrote:



        Glad I could help.

        Can anyone that's officially working on SimplePie comment on this?

        On Wed, Jan 27, 2010 at 11:47 AM, Josh Clark <joshclark17@...> wrote:


        THat did the trick! Thanks a ton! I'm not a hard-core developer and I would never have found that. Thanks again.

        josh

        On Jan 27, 2010, at 11:38 AM, Duane O'Brien wrote:

         

        I saw the same kind of issue, and posted a query about the issue a few
        days ago with no response. I have a suggestion that may help.

        In simplepie.inc, around line 2147, you should see the following function:

        function set_query($query)
        {
        if ($query === null || $query === '')
        {
        $this->query = null;
        }
        else
        {
        $this->query = $this->replace_invalid_with_pct_encoding($query,
        'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~!$\'()*+,;:@/?');
        }
        $this->valid[__FUNCTION__] = true;
        return true;
        }

        Change it to this:

        function set_query($query)
        {
        if ($query === null || $query === '')
        {
        $this->query = null;
        }
        else
        {
        $this->query = $query;
        }
        $this->valid[__FUNCTION__] = true;
        return true;
        }

        and see if it works. It looks to me like simplepie is replacing
        special characters in the query string, for reasons that I don't
        understand. Making this change is how I got mine to work.

        -D

        On Wed, Jan 27, 2010 at 11:33 AM, Joshua <joshclark17@...> wrote:
        > Hi there-
        >
        > I have a feed I'm trying to get working on a site. The address is:
        >
        > http://www.chabad.org/tools/rss/zmanim.xml?c=331
        >
        > The "?c=331" at the end of the xml is a locater for the RSS (which is a Feed telling when particular ethnic times are throughout the day). Without the "?c=331" the feed is useless as what it displays is this:
        >
        > http://new.wizofl.org/resources/daily_halachic_times/
        >
        > I've posted a couple of times, and not got a response (which is fine - I know we're all busy). I'm trying to wrap up this project though and need to know if simplepie is capable of handling this correctly.
        >
        > My code is :
        >
        > require_once('http://new.wizofl.org/inc/simplepie.inc');
        >
        > // We'll process this feed with all of the default options.
        > $feed = new SimplePie();
        >
        >  $feed->set_feed_url('http://www.chabad.org/tools/rss/zmanim.xml?c=331');
        >
        > // This makes sure that the content is sent to the browser as text/html and the UTF-8 character set (since we didn't change it).
        >
        > $feed->encode_instead_of_strip(false);
        > $feed->handle_content_type();
        > $feed->init();
        >
        > Any help would be extremely appreciated.
        >
        > Josh
        >
        >
        >
        > ------------------------------------
        >
        > Yahoo! Groups Links
        >
        >
        >
        >

        -- 
        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        Ideas are good things to have even if they are old.






        -- 
        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        Ideas are good things to have even if they are old.



      • Ryan McCue
        ... A much better solution, and one that I ve already committed (might not have made its way upstream yet) is to add the & and = characters to that string.
        Message 3 of 8 , Jan 27, 2010
        View Source
        • 0 Attachment
          Duane O'Brien wrote:
          > $this->query = $this->replace_invalid_with_pct_encoding($query,
          > 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~!$\'()*+,;:@/?');
          A much better solution, and one that I've already committed (might not
          have made its way upstream yet) is to add the & and = characters to that
          string.

          I'll check ASAP to see if this has made it into the authoritative
          repository.

          --
          Ryan McCue
          <http://ryanmccue.info/>
        • Ryan Parman
          Ryan M, You should be able to merge down and copy up to the official repo. You and Geoffrey have write access. -- Ryan Parman Please
          Message 4 of 8 , Jan 27, 2010
          View Source
          • 0 Attachment
            Ryan M,

            You should be able to merge down and copy up to the official repo. You and Geoffrey have write access.

            --
            Ryan Parman
            <http://ryanparman.com>

            Please don't email/IM me directly. That's why we have a mailing list. ;)






            On Jan 27, 2010, at 1:30 PM, Ryan McCue wrote:

            > Duane O'Brien wrote:
            >> $this->query = $this->replace_invalid_with_pct_encoding($query,
            >> 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~!$\'()*+,;:@/?');
            > A much better solution, and one that I've already committed (might not
            > have made its way upstream yet) is to add the & and = characters to that
            > string.
            >
            > I'll check ASAP to see if this has made it into the authoritative
            > repository.
            >
            > --
            > Ryan McCue
            > <http://ryanmccue.info/>
            >
            >
            >
            > ------------------------------------
            >
            > Yahoo! Groups Links
            >
            >
            >
          Your message has been successfully submitted and would be delivered to recipients shortly.