O'Reilly logo

PHP 5 Kochbuch, Third Edition by Stephan Schmidt, Ulrich Speidel, Matthias Brusdeylins, Carsten Lucke, Adam Trachtenberg, David Sklar

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

20.11 Informationen über einen Domainnamen herausfinden

Problem

Sie möchten Kontaktinformationen oder andere Details über einen Domainnamen herausfinden.

Lösung

Verwenden Sie die Net_Whois-Klasse von PEAR:

require 'Net/Whois.php';
$server = 'whois.networksolutions.com';
$query = 'example.org';

$whois = new Net_Whois;
$data = $whois->query($server, $query);

Diskussion

Die Methode Net_Whois::query( ) gibt einen langen Text-String zurück, dessen Inhalt daran erinnert, wie schwer es sein kann, verschiedene Whois-Resultate zu analysieren:

Registrant: Internet Assigned Numbers Authority (EXAMPLE2-DOM) 4676 Admiralty Way, Suite 330 Marina del Rey, CA 90292 US Domain Name: EXAMPLE.ORG Administrative Contact, Technical Contact, Billing Contact: Internet Assigned ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required