2

I am playing around with phpWhois: https://github.com/phpWhois/phpWhois

It's installed, and works great. But I would like to do the WHOIS request via a proxy IP. WHOIS servers often block IP's when they make too many requests, and therefor I want to use various proxies to ensure I don't get blocked.

phpWhois has proxy support as I can set: $allowproxy = true;

But apart from that, I see no documentation on how tell the script which proxies/ports to use. Can anyone point me in the right direction please?

Mr.Boon
  • 2,024
  • 7
  • 35
  • 48
  • There is no concept of proxies in `whois` protocol. You can just use it from various endpoints, using standard methods like tunnels, socks, etc. – Patrick Mevzek Jan 02 '18 at 19:38

1 Answers1

0

Let's have a look into that source code:

fputs($ptr, trim($query_args) . "\r\n");

I'm sorry, this class doesn't support any proxy. You'll need a SOCKS implementation, and PHP doesn't support that with fputs() on a socket.

However I can recommend my Whois API which reliefs you from that complexity. whois-api-php would be a PHP client:

$whoisApi = new whoisServerList\WhoisApi("apiKey");
echo $whoisApi->query("whois.verisign-grs.com", "example.net");
Markus Malkusch
  • 7,738
  • 2
  • 38
  • 67