[horde] Using curl wrappers instead of fopen
Daniel Reich
me at danielreich.com
Tue Jan 21 12:59:44 PST 2003
I guess what I'm looking to do here is standardize the way URLs are
fetched within the Horde framework. I did look at Snoopy btw but I
looked at the library included with Klutz. It does have some
interesting things. My thought is that it would be nice if I could set
the proxy (or other pertinent connection information) in one place and
then have all the modules take advantage of it. It wouldn't be very
difficult to write and I'd be happy to do so if there is consensus on
going down that path. I could either modify Snoopy or write a new class
from scratch. I do think modifying snoopy is probably a better path.
Once that's in place I could go around to the various modules and modify
them to use this new method.
Right now I have to go and modify each module to utilize the proxy which
i'd like to get away from. The only scary part about snoopy is that it
utilizes the command line curl instead of the PHP extension (from what I
gather curl extension isn't stable on all builds). But I don't see any
attempts to escape characters in the actual exec call. From the looks
of it, this is only a concern for doing https calls. HTTP requests
don't make use of curl. (at least in v1.0, Horde includes v0.94). I'm
gonna see if I can get clarification on this from the developers of
Snoopy.
Cheers
-dr
> From: Jan Schneider <jan at horde.org>
> To: horde at lists.horde.org
> Subject: Re: [horde] Using curl wrappers instead of fopen
> Date: 21 Jan 2003 17:50:42 +0100
>
> Zitat von Daniel Reich <me at danielreich.com>:
>
> > I'd like to offer up an alternative to using fopen. Granted curl is yet
> > another module to install, but I think it'd be useful. I wrote a quick
> > function that uses curl to grab a URL via proxy (authenticated too).
> >
> > I thought this could go into the Horde library. And if this is ok, I'd
> > like to write another function which will act as a wrapper so that if
> > you have curl extensions installed it will use curl, otherwise it will
> > use fopen. Other horde modules could utilize this to pull down lots of
> > URLs (ie Jonah). I should probably extend this to handle cookies in
> > some fashion too now that I'm looking back...
>
> You should take a look at Snoopy.php in horde/lib. IIRC it currently uses
> the curl command line interface but it probably can be extended to use the
> extension if available.
>
> Jan.
>
> --
> http://www.horde.org - The Horde Project
> http://www.ammma.de - discover your knowledge
> http://www.tip4all.de - Deine private Tippgemeinschaft
More information about the horde
mailing list