|
Posted by Alan Little on 05/18/06 14:46
Carved in mystic runes upon the very living rock, the last words of Andy
Jeffries of comp.lang.php make plain:
> On Wed, 17 May 2006 20:46:16 -0700, lawrence k wrote:
>> I'm reading over this page:
>>
>> http://www.php.net/manual/en/ref.curl.php
>>
>> What I'm missing is why? What problem does curl solve? What does it
>> make easier? When would I use its functions, instead of simpler
>> functions like file() or fsocketopen()?
>
> Curl automatically handles session cookies if you're retrieving
> multiple pages for a different site.
>
> Curl is a known web page connection interface, using the file()
> interface with allow_url_fopen (to enable fopen to open web pages) can
> lead to security holes (particularly with some dodgy register_globals
> code).
I have a couple of homebrew functions I use for simple POSTs and GETs,
using fsockopen() but, as others have pointed out, there are things that
CURL simplifies, like negotiating an SSL connection. I want to do it in
straight PHP one of these days, just for the hell of it, but for now I
use CURL.
--
Alan Little
Phorm PHP Form Processor
http://www.phorm.com/
Navigation:
[Reply to this message]
|