https://www.myziyuan.com/
- 网站快速搭建
- $domain=array(1=>array('name'=>'重庆市','url'=>' http://chongqing.a.com'),2=>array('name'=>'河南省焦作市','url'=>' http://chongqing.a.com'),);$client=convertip_tiny(client_ip(), './tinyipdata.dat');//将dz/upload/ipdata/tinyipdata.dat 拷贝到相关目录下echo $client.'==>';$d=get_domain($client,$domain);if(!empty($d))echo $d;elseecho ' http://beijing.a.com';echo '';function get_domain($addr,$domains){foreach($domains as $d){if($d['name']==$addr)return $d['url'];}return false;}function convertip_tiny($ip, $ipdatafile) {static $fp = NULL, $offset = array(), $index = NULL;$ipdot = explode('.', $ip);$ip = pack('N', ip2long($ip));$ipdot[0] = (int)$ipdot[0];$ipdot[1] = (int)$ipdot[1];if($fp === NULL && $fp = @fopen($ipdatafile, 'rb')) {$offset = unpack('Nlen', fread($fp, 4));$index = fread($fp, $offset['len'] - 4);} elseif($fp == FALSE) {return '- Invalid IP data file';}$length = $offset['len'] - 1028;$start = unpack('Vlen', $index[$ipdot[0] * 4] . $index[$ipdot[0] * 4 + 1] . $index[$ipdot[0] * 4 + 2] . $index[$ipdot[0] * 4 + 3]);for ($start = $start['len'] * 8 + 1024; $start = $ip) {$index_offset = unpack('Vlen', $index{$start + 4} . $index{$start + 5} . $index{$start + 6} . "\x0");$index_length = unpack('Clen', $index{$start + 7});break;}}fseek($fp, $offset['len'] + $index_offset['len'] - 1024);if($index_length['len']) {$tmp=explode('-',fread($fp, $index_length['len']));return trim($tmp[0]);} else {return 'Unknown';}}function client_ip(){$cip = getenv('HTTP_CLIENT_IP');$xip = getenv('HTTP_X_FORWARDED_FOR');$rip = getenv('REMOTE_ADDR');$srip = $_SERVER['REMOTE_ADDR'];if($cip && strcasecmp($cip, 'unknown')) {$onlineip = $cip;} elseif($xip && strcasecmp($xip, 'unknown')) {$onlineip = $xip;} elseif($rip && strcasecmp($rip, 'unknown')) {$onlineip = $rip;} elseif($srip && strcasecmp($srip, 'unknown')) {$onlineip = $srip;}preg_match("/[\d\.]{7,15}/", $onlineip, $match);$onlineip = $match[0] ? $match[0] : 'unknown';return $onlineip;}
- 2021-03-22 10:55:01
- 源码资源网
- 可以的,但是最好那个地区有该公司的分公司,不然做多个地区的网站也没用,还不如集中力度去做好一个网站。一个网站做好就已经很好了。
- 2021-02-12 09:50:25
- LouisWang
- 求:单页网站源码,<head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>无标题文档</title></head>在这里写字!<body></body></html>
- 2021-02-12 09:50:25