Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ssl/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 使用批量创建和过期日期whois类_Php_Whois - Fatal编程技术网

Php 使用批量创建和过期日期whois类

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

使用批量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 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
,则代码还应处理错误。