|
Posted by Manuel Lemos on 01/19/08 21:09
Hello,
on 01/19/2008 06:52 PM Jerry Stuckle said the following:
> I'm not going to argue with you about whether the HTTPClass is easier to
> use or whatever.
>
> My single point was that cURL is more flexible. You can do anything
> with cURL that you can with the HTTPClient class and more. That is
> pretty obvious - because the HTTPClient class is built on cURL - so if
> cURL can't do it, neither can the HTTPClient class.
>
> But being built on cURL, the HTTPClient class restricts what you can do.
> So it is less flexible.
No, that is not the way it works. I already explained that to you.
The HTTP client class uses Curl when fsockopen calls cannot be used
under the current PHP setup. Curl is used as a better than nothing solution.
For instance before PHP 4.3.0 you can only make SSL request with curl.
The class used curl for SSL requests, but of course, with curl it cannot
not send or receive streamed data in small chunks that never exceed the
PHP memory limits.
If you want that flexibility you need to use PHP 4.3.0 or newer. Then
the class will use fsockopen for SSL requests.
In any case, the HTTP client class abstracts that for you. You do not
need to adapt your application code depending on the PHP version, as the
class does it for you.
I developed the HTTP client class not just as a mere curl wrapper, but
to actually add some benefits on top of curl/fsockopen. So, it was meant
to add flexibility, not to remove it.
That is why I questioned you about you flexibility statement. Maybe you
tried an old version of the HTTP client class and you found some
limitations that no longer exist. But if you still find it less
flexible, I want to understand what you are talking about.
--
Regards,
Manuel Lemos
PHP professionals looking for PHP jobs
http://www.phpclasses.org/professionals/
PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/
[Back to original message]
|