Solved

PHP Whois Function

Posted on 2008-10-20
3
485 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 500 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

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

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

Suggested Solutions

Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this. Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it i…
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
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 …

751 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