Convert fsockopen to curl
Posted: Thu Feb 25, 2010 6:43 am
How to convert this:
$fp = fsockopen($whois_server,43);
into a curl?
$fp = fsockopen($whois_server,43);
into a curl?
A community of PHP developers offering assistance, advice, discussion, and friendship.
http://forums.devnetwork.net/
cURL is not supposed to replace such requests. From their docs:klevis miho wrote:How to convert this:
$fp = fsockopen($whois_server,43);
into a curl?
libcurl (used by both command-line curl and php's curl extension) is an underlying library which performs aforementioned tasks - and thus it's not suitable to work with a protocol it does not support, like whois.curl is a command line tool for transferring data with URL syntax, supporting FTP, FTPS, HTTP, HTTPS, SCP, SFTP, TFTP, TELNET, DICT, LDAP, LDAPS and FILE. curl supports SSL certificates, HTTP POST, HTTP PUT, FTP uploading, HTTP form based upload, proxies, cookies, user+password authentication (Basic, Digest, NTLM, Negotiate, kerberos...), file transfer resume, proxy tunneling and a busload of other useful tricks.