• [织梦吧]唯一域名:www.dedecms8.com,织梦DedeCMS学习平台.

当前位置: > 编程与数据库 > php编程 >

分享几个非常有用的PHP代码片段(4)

来源: www.dedecms8.com 编辑:织梦吧 时间:2012-02-08点击:

  "ae" => "whois.uaenic.ae",

  "at" => "whois.ripe.net",

  "au" => "whois.aunic.net",

  "be" => "whois.dns.be",

  "bg" => "whois.ripe.net",

  "br" => "whois.registro.br",

  "bz" => "whois.belizenic.bz",

  "ca" => "whois.cira.ca",

  "cc" => "whois.nic.cc",

  "ch" => "whois.nic.ch",

  "cl" => "whois.nic.cl",

  "cn" => "whois.cnnic.net.cn",

  "cz" => "whois.nic.cz",

  "de" => "whois.nic.de",

  "fr" => "whois.nic.fr",

  "hu" => "whois.nic.hu",

  "ie" => "whois.domainregistry.ie",

  "il" => "whois.isoc.org.il",

  "in" => "whois.ncst.ernet.in",

  "ir" => "whois.nic.ir",

  "mc" => "whois.ripe.net",

  "to" => "whois.tonic.to",

  "tv" => "whois.tv",

  "ru" => "whois.ripn.net",

  "org" => "whois.pir.org",

  "aero" => "whois.information.aero",

  "nl" => "whois.domain-registry.nl"

  );

  if (!isset($servers[$ext])){

  die('Error: No matching nic server found!');

  }

  $nic_server = $servers[$ext];

  $output = '';

  // connect to whois server:

  if ($conn = fsockopen ($nic_server, 43)) {

  fputs($conn, $domain."\r\n");

  while(!feof($conn)) {

  $output .= fgets($conn,128);

  }

  fclose($conn);

  }

  else { die('Error: Could not connect to ' . $nic_server . '!'); }

  return $output;

  }

 

  10. 通过Email发送PHP错误

  // Our custom error handler

  function nettuts_error_handler($number, $message, $file, $line, $vars){

  $email = "

  

An error ($number) occurred on line

  $line and in the file: $file.

  

$message

";

标签: 非常 几个 分享

About D8

  • ©2014 织梦吧(d8) DedeCMS学习交流平台
  • 唯一网址 www.DedeCMS8.com 网站地图
  • 联系我们 1170734538@qq.com ,  QQ