io-developer / php-whois

PHP WHOIS provides parsed and raw whois lookup of domains and ASN routes. PHP 8.0 compatible (5.4+ old versions)
MIT License
437 stars 117 forks source link

Connection refused #194

Closed land22 closed 1 year ago

land22 commented 1 year ago

Hello to all I have a bug using your package I'm using symfony 4.4 Here is my code `public function calendar(): Response { $repos = $this->getDoctrine()->getRepository(DomaineName::class); $whois = Factory::get()->createWhois(); $domaineName = $repos->findAll(); $i = 0; $date = []; foreach ($domaineName as $data){

        $info = $whois->loadDomainInfo($data->getName());               
        $date[$i]["expiration"] = date("Y-m-d", $info->expirationDate) ;
        $date[$i]["creation"] = date("Y-m-d", $info->creationDate);

$i++; } return $this->render('admin/calendar.html.twig', [ 'dateInfo'=>$date, 'domaineNames' =>$domaineName, ]); } ` Locally it works very well But when I have the code at my host o2switch I get this error Connection refused How can I solve this problem Thanks for your help

bessone commented 1 year ago

Your production server probably has port 53 closed, you can test by logging into the machine via ssh and doing a whois from the console or telnet to port 53.

If the port is closed you have to ask the provider to open the port for you to be able to make calls to the whois servers.