I need recommendations for an established and maintained cURL wrapper library/class to use with cURL in Php.
It wouldn't hurt if there was some documentation with it, but its not a must have.
Thanks
I need recommendations for an established and maintained cURL wrapper library/class to use with cURL in Php.
It wouldn't hurt if there was some documentation with it, but its not a must have.
Thanks
You don't "need" a wrapper. You can use one if you wish, but you can use the native functions fine. I think it all depends on what you're doing.
If you just doing it in one spot in your code (or using it sparingly), just use the native functions. IMHO it's not worth the trouble writing/finding a wrapper when the functions are easy enough to use.
If you are going to be using it a lot in your code (many places), then it may make sense to use a wrapper (to enforce DRY).
Personally, I've never used a wrapper (because I've never found a need) since the CURL functions are not that verbose and there is not a whole lot of checking needed.
Now, if you're going to be releasing the code, or running it on unknown configurations, then a wrapper may come in handy. I say that because not all clients will support CURL. So the wrapper can have a fallback on fsockopen
(and as such, the wrapper would need to translate the CURL commands into manual file commands for use with the raw socket). But if you're in control of the environment, I'd worry about other things personally...
There is a PEAR package that wraps curl: http://pear.php.net/package/HTTP_Request2 Be sure to also install its dependency: http://pear.php.net/package/Net_URL2/