Date: December 10th, 2004
Cate: Geekism
Tags:

Early and Often

What’s that thing they say? Release early and often? In that spirit, and in the context of these two earlier posts, here you go:

Snoopy + native PHP SSL + Digest Auth: ALPHA version

This was based on whatever you call the version of Snoopy that comes with MagpieRSS 0.7. It said 1.0 in the header but I’m not sure if it’s exactly the same as the one you can get from the Snoopy project at SF, or if Magpie’s Snoopy has drifted out of sync.

This is designed to be a drop-in replacement for Snoopy. If you happen to have FoF 0.1.8, this will work extra nicely. Be warned that older versions of FoF had a stupid bug preventing subscription to https addresses, so don’t bother trying it.

Change 1: If you ask this version of Snoopy for an https: URL, instead of trying to execute curl externally, it will check if you are running at least PHP 4.3 and have OpenSSL installed. If so, it will use PHP’s built in SSL implementation. If not, it will fail back to the old behavior and try to find curl to execute. There is also a flag you can set (use_curl) to force the use of curl if you’re happier with that.

Change 2: If you ask this version of Snoopy for a URL with a username/password (ie http://user:pass@example.com), it will first attempt Basic Auth, like always. But if that fails, and the server sends back a header with a Digest Auth challenge, Snoopy will attempt to respond appropriately by issuing another HTTP request with a Digest response. The “killer app” of this feature is subscription to friends-only LJ feeds.

I’d love to get some feedback on this. So download and execute away!

9 Comments

  1. December 12th, 2004
    REPLY))

  2. Its drifted, I’ve tried submitting patches back, but I think the project might be dead.

    I’m thinking about going through and totalling gutting all the pieces I don’t need (like the frame parsing code) to speed things up. Probably give it a new name at that point.

    I’ll definitely take a look at this in the next couple of days.

    1F

  3. stevesteve  
    December 12th, 2004
    REPLY))

  4. I figured that one once I went at looked at the Snoopy SF project. But I also noticed that earlier this year the original developer of Snoopy posted a message there saying he no longer has time to do maintenance, and asked for help. It looks like he’s given a few capable people developer access, and the project is active again! In fact, they just had a release about a month ago. I think there’s still hope to re-merge Magpie-Snoopy with mainline-Snoopy and save everybody a lot of extra work in the long run.

    2F

  5. December 12th, 2004
    REPLY))

  6. Nice, hadn’t checked back in a while. I’ll go tune it.

    3F

  7. AndrewAndrew  
    May 18th, 2005
    REPLY))

  8. Nice, this is sweet! I really don’t like the idea of having the passwords in the links showing up in cleartext, so if I have the time I’m going to try to refactor the code to authenticate via information passed in from the FoF DB – unless anyone has any better suggestions?

    4F

  9. June 21st, 2005
    REPLY))

  10. I was just wondering the other day about whether or not you’d added this support, I’m glad you did (although sad that it took me this long to realize it ;o).

    I’m not too big a fan of the http auth info showing up in plaintext either, but then again my entire install is protected with .htaccess, so the benefits outweigh that tenfold.

    5F

  11. October 27th, 2006
    REPLY))

  12. Halleiluja! (or however it’s spelled)
    I was trying and trying to get a way to display private livejournal posts and YOU did it for me! I thought i was going to have to instantiate multiple snoopy objects to get session cookies and blah blah, but this worked perfectly on the first try!

    6F

  13. Jacob WeberJacob Weber  
    July 25th, 2007
    REPLY))

  14. Very pretty design! Keep working. Go on!

    7F

  15. Sean LinsSean Lins  
    July 25th, 2007
    REPLY))

  16. Thank you!

    8F

  17. Natalie RegoNatalie Rego  
    July 25th, 2007
    REPLY))

  18. Your are Great. And so is your site! Awesome content. Good job guys!

    9F

Leave a Reply

 Name

 Mail

 Home

[Name and Mail is required. Mail won't be published.]