Socket error 10060

While trying to use whois script,I am getting the following error.

Socket Error 10060 - A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.

how to fix this error?

10060 is connection timed-out. What are you trying to socket to?

In my coding i am tryiny to open whois server with the fsockopen function.

$fp = @fsockopen($whoisserver, $port, $errno, $errstr, $timeout) or die(“Socket Error " . $errno . " - " . $errstr);
if($whoisserver == “”) $domain = “=”.$domain; // requires the equals sign (”=") or it returns any result containing the searched string.
fputs($fp, $domain . "\r

It would seem that server is not online at the moment. Are you sure you’ve spelled the address correctly?