unnamed file

PHP

Keine Beschreibung eingegeben.

Guest

Download Edit

<?php
// Domain
if(!isset($_GET[\'domain\'])) exit(\"Error 100\");
$domain = idn_to_ascii(str_replace(array(\'www.\',\'http://\'),\'\',strtolower(trim($_GET[\'domain\']))));
if(!$domain||!preg_match(\'/^[a-z0-9\\-]+\\.[a-z]{2,4}$/\',$domain)) exit(\"Error 101\");
// SOAP
$soap = new SOAPClient(\'https://api.http.net/live/1.0/Service.asmx?WSDL\');
$args = array(
\'authentication\' => array(\'username\' => \'*****\', \'password\' => \'******\'),
\'domain\' => $domain,
\'clTRID\' => \'TrackMania2Server.org Whois\'
);
$response = $soap->DomainAvailable($args);
// result
$av = ($response->response->status==\'available\');
echo \'<h4 class=\"\'.($av?\'available\':\'taken\').\'\"><span>\'.($av?\'Available\':\'Taken\').
\"</span> $domain is \".($av?\'Available\':\'Taken\').\'</h4>\';
?>