[thelist] which is better: cURL vs. fsockopen [PHP]

Dave Olsen david_olsen at sesda.com
Thu Jul 18 17:31:02 CDT 2002


I want to port a PHP script from one server that allows http
connections through fopen() to another that doesn't.

In researching the possible workarounds I've come up with two solutions.

One is fsockopen() which works wonderfully... the only problem is
that I'm not familiar with "sockets" and I don't know if I'm doing
something that will adversely affect the new server or the remote
servers that I'm trying to connect to. I'm assuming that fsockopen()
is really fopen() with more options but... not my server and I don't
want to cause headaches :-)

The second is cURL. It looks straightforward in the documentation on
the PHP.net site. Unfortunately it doesn't appear that the new server
is configured with this though I guess I could ask for it.

Is one better than the other and, if I use fsockopen(), am I going to
screw anything up by using these instead fopen()?

Thanks for your help.

--

Dave Olsen
"long time lurker, first time caller"

http://visibleearth.nasa.gov/
http://earthobservatory.nasa.gov/
http://members.evolt.org/dolsen/



More information about the thelist mailing list