By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,334 Members | 1,861 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,334 IT Pros & Developers. It's quick & easy.

is php/curl the best tool for php http communication

P: n/a
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

Jul 17 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
ma*********@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.
Jul 17 '05 #2

P: n/a
ma*********@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

Jul 17 '05 #3

P: n/a
Hello,

on 06/14/2005 06:36 AM ma*********@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
Jul 17 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.