Php 使用批量创建和过期日期whois类
使用批量whois类 我想利用大量的域名创建,过期和注册我的错误在哪里?我是新的php程序员Php 使用批量创建和过期日期whois类,php,whois,Php,Whois,使用批量whois类 我想利用大量的域名创建,过期和注册我的错误在哪里?我是新的php程序员 <?php error_reporting(E_ERROR | E_WARNING); # Change to path of phpwhois folder, wherever it is define ("PHP_WHOIS_PATH" , "phpwhois-4.2.2"); include(PHP_WHOIS_PATH . '/whois.main.php'); function
<?php
error_reporting(E_ERROR | E_WARNING);
# Change to path of phpwhois folder, wherever it is
define ("PHP_WHOIS_PATH" , "phpwhois-4.2.2");
include(PHP_WHOIS_PATH . '/whois.main.php');
function ez( $domain )
{
$whois = new Whois();
$data = $whois->Lookup($domain);
$return['registrar'] = $data['regyinfo']['registrar'];
$return['expires'] = $data['regrinfo']['domain']['expires'];
$return['created'] = $data['regrinfo']['domain']['created'];
return $return;
}
$domain = $_POST['url'];
if(substr(strtolower($domain), 0, 7) == "http://") $domain = substr($domain, 7); // remove http:// if included
if(substr(strtolower($domain), 0, 8) == "https://") $domain = substr($domain, 8); // remove https:// if included
if(substr(strtolower($domain), 0, 4) == "www.") $domain = substr($domain, 4);//remove www from domain
$domain = rtrim($domain,"/");
$text = ez($domain) ;
$domainlist = explode ("\n", trim ($text));
// Just the expires :
foreach ($domainlist as $line) {
$line = ez(trim($line));
echo "Your Domain: " . $_POST['url'];
echo "<br />\n";
echo "Expire Date: ". $text['expires'];
echo "<br />\n";
echo "Registrar: " . $text['registrar'];
echo "<br />\n";
echo "Creation Date: " . $text['created'];
echo "<br />\n";
}
?>
请详细说明您的问题。它将帮助人们理解你的代码以及你希望它做什么。我只想检查过期日期,在Bulk中创建日期注册器,还有什么不起作用?顺便说一句,请注意您有一次regyinfo
和两次reginfo
。BTW2您的字符串搜索有时会出错,例如,您的代码不允许查询域名www.com
。如果未正确设置ez()
中的$data
,则代码还应处理错误。