Reply to Re: when does it ever make sense to use curl?

Your name:

Reply:


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/

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация