Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

PHP Whois Function

Posted on 2008-10-20
3
Medium Priority
?
498 Views
Last Modified: 2013-12-13
Folks,

Am developing a web hosting project, i just wanna confirm how domain name whois information is written in PHP.
0
Comment
Question by:nitation
3 Comments
 
LVL 26

Expert Comment

by:Umesh
ID: 22755846
0
 

Author Comment

by:nitation
ID: 22756120
None of the both is working. One error to the other.
0
 
LVL 8

Accepted Solution

by:
MatthiasVance earned 1500 total points
ID: 22758867
I hope this helps you.

Kind regards,

Matthias Vance
<?php
	error_reporting(E_ALL);
 
	function whois($query, $server) {
		$socket = fsockopen($server, 43, $errno, $errstr, 10);
		if(!$socket) {
			return false;
		}
		fwrite($socket, $query . "\r\n");
		$response = "";
		while(!feof($socket)) {
			$response .= fgets($socket, 1024);
		}
		fclose($socket);
		return $response;
	}
 
	echo whois("matthiasvance.com", "whois.verisign-grs.com");
?>

Open in new window

0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I imagine that there are some, like me, who require a way of getting currency exchange rates for implementation in web project from time to time, so I thought I would share a solution that I have developed for this purpose. It turns out that Yaho…
These days socially coordinated efforts have turned into a critical requirement for enterprises.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Suggested Courses

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question