Unstoppable Domains

Internal Server Error

Spaceship Spaceship
Watch

Barrucadu

Established Member
Impact
64
FIXED: Internal Server Error

FIXED


When I run a whois script I made, I get an internal server error when it calls fgets(), here is the code:

PHP:
function whois ($server, $query, $port, $avaliable_phrases){
	$query = whois_prepare($query, $server);
	$avaliable = false;
	$sock = @fsockopen($server,$port);
	$whois = '';
	
	echo '<tr><td>'.$query.'</td>';
	
	if(!$sock){
		die('<td style=\'color:#FF0000\' colspan=\'2\'>Could not open socket.</td></tr>');
	}else{
		$send_request = @fputs($sock,$query.'\r\n');

		if(!$send_request){
			die('<td style=\'color:#FF0000\' colspan=\'2\'>Unable to send request.</td></tr>');
		}else{
			while (!feof($sock)) {
       			$whois .= fgets($sock, 1024);
  			}

			foreach($avaliable_phrases as $phrase){
				if(eregi($phrase,$whois)){
					$avaliable = true;
				}
			}
		
			@fclose($sock);
			
			if($avaliable == true){
				echo '<td style=\'color:#00FF00\'>Avaliable</td><td style=\'text-align:center;\'>n/a</td></tr>';
			}else{
				echo '<td style=\'color:#FF0000\'>Unavaliable</td><td><a href=\'domainwhois.php?domain='.$query.'\'>Whois</a></td></tr>';
			}
		}
	}
}

Fixed, it appears that I had an outdated list of whois servers...
 
Last edited:
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
Dynadot — .com Registration $8.99Dynadot — .com Registration $8.99

We're social

Unstoppable Domains
Domain Recover
DomainEasy — Zero Commission
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back