is php/curl the best tool for php http communication

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 ...


Go Back   Usenet Forums > PHP Programming Forums > PHP Language

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 06-14-2005
mahbubur045@yahoo.co.uk
 
Posts: n/a
Default is php/curl the best tool for php http communication

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

Reply With Quote
  #2 (permalink)  
Old 06-14-2005
Colin McKinnon
 
Posts: n/a
Default Re: is php/curl the best tool for php http communication

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.
Reply With Quote
  #3 (permalink)  
Old 06-14-2005
R. Rajesh Jeba Anbiah
 
Posts: n/a
Default Re: is php/curl the best tool for php http communication

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

Reply With Quote
  #4 (permalink)  
Old 06-16-2005
Manuel Lemos
 
Posts: n/a
Default Re: is php/curl the best tool for php http communication

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
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 11:56 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0