How to convert this:
$fp = fsockopen($whois_server,43);
into a curl?
Convert fsockopen to curl
Moderator: General Moderators
-
klevis miho
- Forum Contributor
- Posts: 413
- Joined: Wed Oct 29, 2008 2:59 pm
- Location: Albania
- Contact:
Re: Convert fsockopen to curl
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.
-
klevis miho
- Forum Contributor
- Posts: 413
- Joined: Wed Oct 29, 2008 2:59 pm
- Location: Albania
- Contact:
Re: Convert fsockopen to curl
Yeah thank you man, I've just read that cURL cannot handle whois requests 