pecinho Posted October 18, 2014 Share Posted October 18, 2014 I have this PHP script to fetch whois information of domain. It works, but when I try to connect whois server via proxy, then it doesnt work. The proxy ip is taken from proxylist.hidemyass.com. What I do wrong? Thank you for help. $server = "whois.nic.cz"; $domain = "klikzone.cz"; function QueryWhoisServer($server, $domain){ $proxy = "85.111.25.189:8080"; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $server); curl_setopt($ch, CURLOPT_PORT, 43); curl_setopt($ch, CURLOPT_PROXY, $proxy); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); curl_setopt($ch, CURLOPT_HEADER, 1); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_TIMEOUT, 30); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $domain . "\r\n"); $data = curl_exec($ch); curl_close($ch); return $data; } Quote Link to comment https://forums.phpfreaks.com/topic/291905-php-whois-via-proxy/ Share on other sites More sharing options...
jcbones Posted October 18, 2014 Share Posted October 18, 2014 Have you tried: echo curl_error($ch); ?? Quote Link to comment https://forums.phpfreaks.com/topic/291905-php-whois-via-proxy/#findComment-1494084 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.