【为什么域名定义到A目录,A目录上面的文件和目录就不能通过地址栏查看呢】教程文章相关的互联网学习教程文章

无数据库的详细域名查询程序PHP版(1)_php基础

文件一:index.php echo " \\n\"; /* ######################################################################################### # # # 本域名查询系统由mydowns收集整理汉化,汉化归把握时间网站所有(http://www.85time.com) # # 该程序是2001年5月18日发布的最新版本,本站将对此程序继续进行修改完善,敬请关注...

一个域名查询的程序_php基础

(主要用了两个字符串函数implode()和explode) 我制作的域名查询的源代码,主要用了两个字符串函数implode()和explode,利用这两个函数的切割字符串的强大功能,可以查询.com,.net.,org.,cc.,tv下的域名whois。 echo '"; if (isset($string)) { $url = "http://networksolutions.com/cgi-bin/whois/whois?STRING=".$string."&STRING=Search"; $str = implode("",file($url)); $aa= explode("$bb=$aa[1]; $cc=explode("re>"...

一个简单的域名注册情况查询程序_php基础

// 查询是否存在一个域名 function SearchDomain($domainName) { // 判断域名是否合法,我对正规表达式不熟悉,那位朋友有详细资料,不妨借我一阅 :-) // if(!eregi("*.*",$domainName)) { // $re[0]="域名只能是字母、数字和“-”(键盘上的减号)组成,且最大长度为26个字符。请按正确的格式填写域名!"; // $re[1]="域名名字不符合要求!"; // return $re; // } $name=strtolower($domainName); //变小写 if(strpos($na...

如何开发一个虚拟域名系统_php基础

大家在使用诸如yourname.yeah.net这样的简记域名时都感到十分方便,有很多人在想:我要是能让自己的服务器也能够实现简记域名就好了。其实这并不复杂。看完了本文,你也可以做一个简记域名系统。   简记域名系统的关键技术在于:实现Web页面的重定向(Redirctory)。在本质上,简记域名系统和虚拟机系统完全不同。虚拟机的虚拟域名和IP是存在一一对应关系的。而简记域名系统不需要将域名和IP做一一映射。也就是说,它根本不需要...

用PHP查询域名状态whois的类_php基础

代码如下:class SearchDomain { var $domain=""; function SetDomain($udomain) { $this->domain = $udomain; } // // 获取whois并分析域名状态 // ok 未被注册 // 非空值 过期时间 // 空值 未知 // function GetInfo() { /* $dinfo = trim($this->GetWhois()); if($dinfo=="") return ""; if(eregi("no match",$dinfo)) return "ok"; //return $rs; */ $wl = ""; $w_server = $this->GetServer(); if($w_se...

同一空间绑定多个域名而实现访问不同页面的PHP代码_php技巧

switch ($_SERVER["HTTP_HOST"]) { case "www1.aspcn.net": header("location:index1.htm"); break; case "www2.aspcn.net": header("location:index2.htm"); break; case "www3.aspcn.net": header("location:index3.htm"); ...... 继续添加 ...... break; } ?>

删除及到期域名的查看(抢域名必备哦)_php基础

查看准备删除的国际域名列表:   两个国外的网站   http://www.pool.com/viewlist.aspx http://www.deleteddomains.com/today_deletions.php国外站点速度有点慢  国内,国际域名过期删除查询   http://www.Snaper.net  CN域名暂停名单和删除名单列表:   今天暂停域名名单   http://www.cnnic.cn/download/registar_list/pendingDel.txt  今天到期删除域名名单   http://www.cnnic.cn/download/registar_li...

PHP获取网站域名和地址的代码_php技巧

代码如下:function PMA_getenv($var_name) { if (isset($_SERVER[$var_name])) { return $_SERVER[$var_name]; } elseif (isset($_ENV[$var_name])) { return $_ENV[$var_name]; } elseif (getenv($var_name)) { return getenv($var_name); } elseif (function_exists('apache_getenv') && apache_getenv($var_name, true)) { return apache_getenv($var_name, true); } return ''; } if (empty($HTTP_HOST)) { if (PMA_getenv('HT...

PHP实现域名whois查询的代码(数据源万网、新网)_php技巧

万网 whois(使用的接口为万网提供合法接口) 代码如下:function whois_hichina($domain) { preg_match("|(.+?)|is", @file_get_contents(http://whois.hichina.com/cgi-bin/whois?domain=.$domain.), $whois); $whois[0] = str_replace(友情提示:按注册局要求,过期域名可能会处于注册商自动续费期阶段,您在此查询所看到的域名到期日仅供参考请您进入会员区查看该域名的实际到期时间,并请及时进行续费,谢谢!, , ($whois[0]));...

php短域名转换为实际域名函数_php技巧

代码如下:$url = "http://sinaurl.cn/hbdsU5"; echo unshorten($url); function unshorten($url) { $url = trim($url); $headers = get_headers($url); $location = $url; $short = false; foreach($headers as $head) { if($head=="HTTP/1.1 302 Found") $short = true; if($short && startwith($head,"Location: ")) { $location = substr($head,10); } } return $location; } function startwith($Haystack, $Needle){ return s...

php中取得URL的根域名的代码_php技巧

代码如下:/** * 取得根域名 * * @author lonely * @create 2011-3-11 * @version 0.1 * @lastupdate lonely * @package Sl */ class Sl_RootDomain{ private static $self; private $domain=null; private $host=null; private $state_domain; private $top_domain; /** * 取得域名分析实例 * Enter description here ... */ public static function instace(){ if(!self::$self) self::$self=new self(); return self::$self; } p...

apache+codeigniter通过.htcaccess做动态二级域名解析_php技巧

代码如下:AuthName "yousite Website Coming Soon..." //如果你想给你的网站加个权限访问 AuthType Basic AuthUserFile D:/xxx/.htpasswd #如果你想设置密码访问 如何生成.htpasswd可以访问 http://www.htaccesstools.com/htpasswd-generator/ #AuthGroupFile /dev/null require valid-user <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / #Removes access to the system folder by users. #Additionally this will all...

域名和cookie问题(域名后缀)_php技巧【图】

域名和cookie 偶然想到一个问题:www.g.cn能把cookie设置为.g.cn,那么www.com.cn能设置把cookie设置为.com.cn吗? 试验结果:不能。因为浏览器知道www.com.cn的后缀是.com.cn而不是.cn,所以禁止设置cookie。 因为浏览器内置了域名后缀列表。todo:如果以后出现新的后缀,而老浏览器没法更新列表,岂不是会允许设置cookie? extension后缀 一级域名 二级域名www.g.cn .cn g.cn *.g.cnwww.com.cn .com.cn www.com.cn *.www.com.cnw...

PHP获取网址的顶级域名函数代码_php技巧

PHP获取网址的顶级域名函数 目前国际顶级域名有:com|edu|gov|int|mil|net|org|biz|info|pro|name|museum|coop|aero|xxx|idv|mobi|cc|me 地域型域名比较多,应该是每个国家地区都会有吧,有心可以去收集,不过据我了解这个域名都是2个字母构成的,它可以单独使用也可以喝国际顶级域名结合使用地域型域名如: cn 中国 tw 台湾 hk 香港 域名例子: jb51.cn baidu.com jb51.com.cn 以jb51.dom.cn为例:phpwind(自定义部分).com(国际...

PHP--用万网的接口实现域名查询功能_php实例

今天给别人做网站时有个需求是要有域名查询功能,查了点资料写了个简单的查询功能 前台页面用的是checkbox,代码如下: 代码如下: PHP代码: 代码如下://得到顶级域名 $ext=$_POST['ext']; //得到二级域名 $dns = $_POST['dns']; //print_r($ext); //$domain = $dns . "." . $ext[0]; //echo $domain; //遍历所有的域名 foreach ($ext as $value) { //组合域名 $domain = $dns . "." . $value; //查询: echo $domain ; $do = "...