This is a discussion on is php/curl the best tool for php http communication within the PHP Language forums, part of the PHP Programming Forums category; I am little new in php environment. For one of my project I tried to do http communication(e.g ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
I am little new in php environment. For one of my project I tried to do
http communication(e.g XML message exchange) in php using cURL. is ther any limitaion/problem/overhead using php/curl for that purpose? Your comments are highly appreciable. Best Regards, Sumon |
|
|||
|
mahbubur045@yahoo.co.uk wrote:
> I am little new in php environment. For one of my project I tried to do > http communication(e.g XML message exchange) in php using cURL. is ther > any limitaion/problem/overhead using php/curl for that purpose? > > Your comments are highly appreciable. > Nope - I've run benchmarks using various implementations in PHP and using libcURL was the fastest (running the `curl` program was the slowest, also tried 'file()', 'file_get_contents()' and my own URL wrapper with 'fsockopen()'). You can even do strange things like client side certificates. Only issue is when the other end doesn't really speak HTTP - I've got a couple of companies I deal with whom *claim* they talk HTTP, but don't. HTH C. |
|
|||
|
mahbubur045@yahoo.co.uk wrote:
> I am little new in php environment. For one of my project I tried to do > http communication(e.g XML message exchange) in php using cURL. is ther > any limitaion/problem/overhead using php/curl for that purpose? My favorite is cURL--it's quite handy to handle cookies and redirects; there are even reports that it can be used with Mozilla to handle JavaScript. The only problem might be the host supporting; it may not be available in few servers. FWIW, try also Manuel Lemos' <http://www.phpclasses.org/httpclient> -- <?php echo 'Just another PHP saint'; ?> Email: rrjanbiah-at-Y!com Blog: http://rajeshanbiah.blogspot.com |
|
|||
|
Hello,
on 06/14/2005 06:36 AM mahbubur045@yahoo.co.uk said the following: > I am little new in php environment. For one of my project I tried to do > http communication(e.g XML message exchange) in php using cURL. is ther > any limitaion/problem/overhead using php/curl for that purpose? I have experienced problems with curl accessing IIS servers via HTTP/1.1. It seems that curl library does not handle very well 100 Continue responses of HTTP/1.1. If you can, always prefer fsockopen connections over CURL. You may want try this HTTP client class that handles that properly and can detect when it can use fsockopen or curl library for you: http://www.phpclasses.org/httpclient -- Regards, Manuel Lemos PHP Classes - Free ready to use OOP components written in PHP http://www.phpclasses.org/ PHP Reviews - Reviews of PHP books and other products http://www.phpclasses.org/reviews/ Metastorage - Data object relational mapping layer generator http://www.meta-language.net/metastorage.html |