cURL Alternative?

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
I'm porting some code from C++ to PHP, and the C++ application I'm
porting from uses the cURL library ( /). The library
is used to both make requests to an internal website at my work and to
look at the returned HTTP response codes (200, 401, 404, etc). It then
takes appropriate action, based on the response code that was

Assuming I was unable to use the cURL library in my PHP code (due to
mostly non-technical reasons), what alternatives do I have to do user
authentication and checking the resulting HTTP response codes? I have
been pointed to the Snoopy class hosted at SourceForge (http://, but it cannot handle HTTPS
authentication without the cURL library. Are there native calls
available for me to do this kind of thing? If so, what are they?

Thanks in advance for any help you might be able to provide.


Re: cURL Alternative?

Jonah Bishop wrote:

Quoted text here. Click to load it

There's the HTTP_Request PEAR library; you could use system() to call a
command-line tool such as "/usr/bin/wget" or "/usr/bin/GET"; or you could
use plain old TCP sockets and your own code to make the requests (as HTTP
is a very simple text-based protocol).

Toby A Inkster BSc (Hons) ARCS
Contact Me ~
Geek of ~ HTML/SQL/Perl/PHP/Python*/Apache/Linux

* = I'm getting there!

Re: cURL Alternative?


on 03/12/2007 10:47 AM Jonah Bishop said the following:
Quoted text here. Click to load it

You may want to try this HTTP client class. It can handle HTTPS without
Curl as it uses the fsockopen call to establish HTTP connections. It
also supports many types of authentication including Basic, Digest, NTLM
(Windows or Samba).


Manuel Lemos

Metastorage - Data object relational mapping layer generator

PHP Classes - Free ready to use OOP components written in PHP

Re: cURL Alternative?

Quoted text here. Click to load it

The good old fsockopen().  You can send raw HTTP headers and receive
responses, just like browsers do.  If you have OpenSSL enabled, you
can do HTTPS just as easily.  For a simple example, see my old post to


Site Timeline