亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? ntp.php

?? Bug tracker, and reporter.
?? PHP
字號(hào):
<?php/** * Zend Framework * * LICENSE * * This source file is subject to the new BSD license that is bundled * with this package in the file LICENSE.txt. * It is also available through the world-wide-web at this URL: * http://framework.zend.com/license/new-bsd * If you did not receive a copy of the license and are unable to * obtain it through the world-wide-web, please send an email * to license@zend.com so we can send you a copy immediately. * * @category   Zend * @package    Zend_TimeSync * @copyright  Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com) * @version    $Id: Ntp.php 8230 2008-02-20 22:38:48Z thomas $ * @license    http://framework.zend.com/license/new-bsd     New BSD License *//** * Zend_TimeSync_Protocol */require_once 'Zend/TimeSync/Protocol.php';/** * @category   Zend * @package    Zend_TimeSync * @copyright  Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com) * @license    http://framework.zend.com/license/new-bsd     New BSD License */class Zend_TimeSync_Ntp extends Zend_TimeSync_Protocol{    /* This is the NTP port number (123) assigned by the Internet Assigned      * Numbers Authority to NTP     *     * @var int     */    protected $_port = 123;    /**     * Class constructor, sets the timeserver and port number     *     * @param  string $timeserver     * @param  int    $port     */    public function __construct($timeserver, $port)    {        $this->_timeserver = 'udp://' . $timeserver;        if (!is_null($port)) {            $this->_port = $port;        }    }    /**     * Prepare local timestamp for transmission in our request packet     *      * NTP timestamps are represented as a 64-bit fixed-point number, in     * seconds relative to 0000 UT on 1 January 1900.  The integer part is     * in the first 32 bits and the fraction part in the last 32 bits     *      * @return string     */    protected function _prepare()    {        $frac   = microtime();        $fracb1 = ($frac & 0xff000000) >> 24;        $fracb2 = ($frac & 0x00ff0000) >> 16;        $fracb3 = ($frac & 0x0000ff00) >> 8;        $fracb4 = ($frac & 0x000000ff);        $sec    = time() + 2208988800;        $secb1  = ($sec & 0xff000000) >> 24;        $secb2  = ($sec & 0x00ff0000) >> 16;        $secb3  = ($sec & 0x0000ff00) >> 8;        $secb4  = ($sec & 0x000000ff);        $nul = chr(0x00);        $nulbyte = $nul . $nul . $nul . $nul;        $ntppacket  = chr(0xd9) . $nul . chr(0x0a) . chr(0xfa); // Flags        /* Root delay         *         * Indicates the total roundtrip delay to the primary reference          * source at the root of the synchronization subnet, in seconds         */        $ntppacket .= $nul . $nul . chr(0x1c) . chr(0x9b);        /* Clock Dispersion         *          * Indicates the maximum error relative to the primary reference source at the         * root of the synchronization subnet, in seconds         */        $ntppacket .= $nul . chr(0x08) . chr(0xd7) . chr(0xff);        /* ReferenceClockID         *          * Identifying the particular reference clock         */        $ntppacket .= $nulbyte;        /* The local time, in timestamp format, at the peer when its latest NTP message         * was sent. Contanis an integer and a fractional part         */        $ntppacket .= chr($secb1)  . chr($secb2)  . chr($secb3)  . chr($secb4);        $ntppacket .= chr($fracb1) . chr($fracb2) . chr($fracb3) . chr($fracb4);        /* The local time, in timestamp format, at the peer. Contains an integer         * and a fractional part.         */        $ntppacket .= $nulbyte;        $ntppacket .= $nulbyte;        /* This is the local time, in timestamp format, when the latest NTP message from         * the peer arrived. Contanis an integer and a fractional part.         */        $ntppacket .= $nulbyte;        $ntppacket .= $nulbyte;        /*         * the local time, in timestamp format, at which the         * NTP message departed the sender. Contanis an integer         * and a fractional part.         */        $ntppacket .= chr($secb1) .chr($secb2) .chr($secb3) .chr($secb4);        $ntppacket .= chr($fracb1).chr($fracb2).chr($fracb3).chr($fracb4);                return $ntppacket;    }    /**     * Reads the data returned from the timeserver     *      * This will return an array with binary data listing:     *      * @return array     * @throws Zend_TimeSync_Exception     */    protected function _read()    {        $flags = ord(fread($this->_socket, 1));        $info  = stream_get_meta_data($this->_socket);        if ($info['timed_out']) {            fclose($this->_socket);            throw new Zend_TimeSync_Exception("could not connect to " .                "'$this->_timeserver' on port '$this->_port', reason: 'server timed out'");        }        $result = array(            'flags'          => $flags,            'stratum'        => ord(fread($this->_socket, 1)),            'poll'           => ord(fread($this->_socket, 1)),            'precision'      => ord(fread($this->_socket, 1)),            'rootdelay'      => ord(fread($this->_socket, 4)),            'rootdispersion' => ord(fread($this->_socket, 4)),            'referenceid'    => ord(fread($this->_socket, 4)),            'referencestamp' => ord(fread($this->_socket, 4)),            'referencemicro' => ord(fread($this->_socket, 4)),            'originatestamp' => ord(fread($this->_socket, 4)),            'originatemicro' => ord(fread($this->_socket, 4)),            'receivestamp'   => ord(fread($this->_socket, 4)),            'receivemicro'   => ord(fread($this->_socket, 4)),            'transmitstamp'  => ord(fread($this->_socket, 4)),            'transmitmicro'  => ord(fread($this->_socket, 4)),            'clientreceived' => 0        );        $this->_disconnect();        return $result;    }    /**     * Sends the NTP packet to the server     *      * @param  array $data     */    protected function _write($data)    {        $this->_connect();        fwrite($this->_socket, $data);        stream_set_timeout($this->_socket, Zend_TimeSync::$options['timeout']);    }    /**     * Extracts the binary data returned from the timeserver     *      * @param  array $binary     * @return integer     */    protected function _extract($binary)    {        /*         * Leap Indicator bit 1100 0000         *         * Code warning of impending leap-second to be inserted at the end of         * the last day of the current month.         */        $leap = ($binary['flags'] & 0xc0) >> 6;        switch($leap) {            case 0 :                $this->_info['leap'] = '0 - no warning';                break;            case 1 :                $this->_info['leap'] = '1 - last minute has 61 seconds';                break;            case 2 :                $this->_info['leap'] = '2 - last minute has 59 seconds';                break;            default:                $this->_info['leap'] = '3 - not syncronised';        }        /*         * Version Number bit 0011 1000         *          * This should be 3 (RFC 1305)         */        $this->_info['version'] = ($binary['flags'] & 0x38) >> 3;        /*         * Mode bit 0000 0111         *         * Except in broadcast mode, an NTP association is formed when two peers          * exchange messages and one or both of them create and maintain an          * instantiation of the protocol machine, called an association.         */        $mode = ($binary['flags'] & 0x07);        switch($mode) {            case 1 :                $this->_info['mode'] = 'symetric active';                break;            case 2 :                $this->_info['mode'] = 'symetric passive';                break;            case 3 :                $this->_info['mode'] = 'client';                break;            case 4 :                $this->_info['mode'] = 'server';                break;            case 5 :                $this->_info['mode'] = 'broadcast';                break;            default:                $this->_info['mode'] = 'reserved';                break;        }        $ntpserviceid = 'Unknown Stratum ' . $binary['stratum'] . ' Service';        /*         * Reference Clock Identifier         *         * Identifies the particular reference clock.         */        $refid = strtoupper($binary['referenceid']);        switch($binary['stratum']) {            case 0:                if (substr($refid, 0, 3) == 'DCN') {                    $ntpserviceid = 'DCN routing protocol';                } else if (substr($refid, 0, 4) == 'NIST') {                    $ntpserviceid = 'NIST public modem';                } else if (substr($refid, 0, 3) == 'TSP') {                    $ntpserviceid = 'TSP time protocol';                } else if (substr($refid, 0, 3) == 'DTS') {                    $ntpserviceid = 'Digital Time Service';                }                break;            case 1:                if (substr($refid, 0, 4) == 'ATOM') {                    $ntpserviceid = 'Atomic Clock (calibrated)';                } else if (substr($refid, 0, 3) == 'VLF') {                    $ntpserviceid = 'VLF radio';                } else if ($refid == 'CALLSIGN') {                    $ntpserviceid = 'Generic radio';                } else if (substr($refid, 0, 4) == 'LORC') {                    $ntpserviceid = 'LORAN-C radionavigation';                } else if (substr($refid, 0, 4) == 'GOES') {                    $ntpserviceid = 'GOES UHF environment satellite';                } else if (substr($refid, 0, 3) == 'GPS') {                    $ntpserviceid = 'GPS UHF satellite positioning';                }                break;            default:                $ntpserviceid  = ord(substr($binary['referenceid'], 0, 1));                $ntpserviceid .= '.';                $ntpserviceid .= ord(substr($binary['referenceid'], 1, 1));                $ntpserviceid .= '.';                $ntpserviceid .= ord(substr($binary['referenceid'], 2, 1));                $ntpserviceid .= '.';                $ntpserviceid .= ord(substr($binary['referenceid'], 3, 1));                break;        }        $this->_info['ntpid'] = $ntpserviceid;        /*         * Stratum         *         * Indicates the stratum level of the local clock         */        switch($binary['stratum']) {            case 0:                $this->_info['stratum'] = 'undefined';                break;            case 1:                $this->_info['stratum'] = 'primary reference';                break;            default:                $this->_info['stratum'] = 'secondary reference';                break;        }        /*          * Indicates the total roundtrip delay to the primary reference source at the          * root of the synchronization subnet, in seconds.         *         * Both positive and negative values, depending on clock precision and skew, are         * possible.         */        $this->_info['rootdelay']     = $binary['rootdelay'] >> 15;        $this->_info['rootdelayfrac'] = ($binary['rootdelay'] << 17) >> 17;                /*         * Indicates the maximum error relative to the primary reference source at the         * root of the synchronization subnet, in seconds.          *          * Only positive values greater than zero are possible.         */        $this->_info['rootdispersion']     = $binary['rootdispersion'] >> 15;        $this->_info['rootdispersionfrac'] = ($binary['rootdispersion'] << 17) >> 17;        /*         * The local time, in timestamp format, at the peer         * when its latest NTP message was sent.         */        $original  = (float) $binary['originatestamp'];        $original += (float) $binary['originatemicro'] / 4294967296;        /*         * The local time, in timestamp format, when the latest         * NTP message from the peer arrived.         */        $received  = (float) $binary['receivestamp'];        $received += (float) $binary['receivemicro'] / 4294967296;        /*         * The local time, in timestamp format, at which the         * NTP message departed the sender.         */        $transmit  = (float) $binary['transmitstamp'];        $transmit += (float) $binary['transmitmicro'] / 4294967296;        /*         * The roundtrip delay of the peer clock relative to the local clock          * over the network path between them, in seconds.          *         * Note that this variable can take on both positive and negative values,          * depending on clock precision and skew-error accumulation.         */        $roundtrip = ($binary['clientreceived'] - $original) - ($transmit - $received);        $this->_info['roundtrip'] = $roundtrip / 2;        // the offset of the peer clock relative to the local clock, in seconds.        $offset = $received - $original + $transmit - $binary['clientreceived'];        $this->_info['offset'] = $offset / 2;        $time = time() - $this->_info['offset'];        return $time;    }}

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美男女性生活在线直播观看| 日韩欧美中文字幕制服| 午夜精品一区在线观看| 久久久国产一区二区三区四区小说 | 麻豆精品国产传媒mv男同| 欧美国产1区2区| 欧美一二三区在线| 欧洲另类一二三四区| 欧美性一级生活| 国产一区二区免费在线| 日韩电影网1区2区| 一区二区久久久久| 国产精品福利在线播放| 精品成人一区二区| 欧美一区二区性放荡片| 欧洲一区二区av| 成人av小说网| 国产精品99久久久久| 免费不卡在线观看| 亚洲成人激情av| 亚洲精品高清在线观看| 国产精品久久久久久户外露出 | 亚洲一区免费在线观看| 国产精品美女一区二区三区| 2024国产精品| 日韩一卡二卡三卡| 欧美高清视频www夜色资源网| 色老汉av一区二区三区| 97久久久精品综合88久久| 国产91精品入口| 国产一区 二区| 国产在线一区观看| 精品一区二区影视| 蜜臂av日日欢夜夜爽一区| 日韩精品每日更新| 午夜精品一区二区三区三上悠亚| 亚洲国产日日夜夜| 一区二区高清免费观看影视大全| 亚洲欧美日韩久久| 亚洲视频 欧洲视频| 亚洲精品免费在线观看| 亚洲精品成人精品456| 亚洲乱码一区二区三区在线观看| 亚洲欧美成aⅴ人在线观看| 亚洲人妖av一区二区| 亚洲日本免费电影| 一区二区三区 在线观看视频| 樱花草国产18久久久久| 亚洲一区二区三区在线看| 亚洲综合视频网| 五月激情综合婷婷| 久久99国产精品麻豆| 国产精品一区二区果冻传媒| 成人一级黄色片| www.综合网.com| 在线看不卡av| 777久久久精品| www国产亚洲精品久久麻豆| 亚洲精品一区二区三区四区高清 | 亚洲一区二区在线免费看| 一区二区三区日韩欧美精品| 香蕉久久一区二区不卡无毒影院| 午夜视频在线观看一区二区 | 亚洲v中文字幕| 日本不卡在线视频| 国产综合久久久久久久久久久久| 国产精品一区专区| 91欧美激情一区二区三区成人| 精品视频在线免费看| 欧美tickle裸体挠脚心vk| 国产精品传媒入口麻豆| 亚洲无人区一区| 黑人巨大精品欧美黑白配亚洲| 懂色av一区二区夜夜嗨| 欧美影院精品一区| 欧美精品一区二区三区蜜桃视频| 国产清纯在线一区二区www| 亚洲精品免费在线观看| 精品在线播放午夜| 99国产精品久久久久久久久久| 欧美久久久久久久久久 | 亚洲国产精品久久久久婷婷884 | 午夜精品福利视频网站| 国产一区二区在线观看免费| av亚洲产国偷v产偷v自拍| 欧美高清你懂得| 亚洲国产高清不卡| 日韩精品五月天| 成人18精品视频| 欧美一级国产精品| 亚洲天堂2016| 国产剧情一区在线| 欧美三级视频在线观看| 欧美国产日韩a欧美在线观看| 午夜天堂影视香蕉久久| 不卡视频免费播放| 欧美电影免费观看高清完整版在线 | 不卡在线观看av| 欧美一级免费大片| 伊人夜夜躁av伊人久久| 国产一区二区免费视频| 69久久夜色精品国产69蝌蚪网| 国产精品久久久久三级| 久久 天天综合| 欧美二区三区的天堂| 亚洲欧美日韩综合aⅴ视频| 国产一区二区三区美女| 欧美日韩国产美| 亚洲人成在线观看一区二区| 国产老妇另类xxxxx| 亚洲欧美怡红院| 蜜臀av一区二区在线免费观看| 不卡电影免费在线播放一区| 精品成人a区在线观看| 日韩成人免费看| 欧美日韩高清在线播放| 一区二区三区在线免费视频| 成人美女视频在线看| 久久综合九色综合欧美98| 免费观看久久久4p| 欧美精品123区| 五月天丁香久久| 欧美丰满少妇xxxbbb| 亚洲国产成人高清精品| 欧美在线视频全部完| 亚洲天堂免费看| 91毛片在线观看| 亚洲人妖av一区二区| 91视频一区二区| 亚洲天堂久久久久久久| 97se亚洲国产综合自在线观| 国产精品久久久一区麻豆最新章节| 精品一区二区三区免费毛片爱| 日韩一区二区在线播放| 毛片基地黄久久久久久天堂| 91精品国产色综合久久不卡蜜臀| 亚洲国产视频a| 欧美日韩一区二区三区不卡 | 国内精品伊人久久久久av一坑| 日韩一卡二卡三卡国产欧美| 久热成人在线视频| 欧美成人官网二区| 精久久久久久久久久久| 久久天堂av综合合色蜜桃网| 精品在线你懂的| 久久久久国产成人精品亚洲午夜| 国产一区二区三区在线观看免费视频| 精品久久久久久久久久久久包黑料| 日韩vs国产vs欧美| 精品国产3级a| 成人一二三区视频| 亚洲免费观看高清在线观看| 在线精品国精品国产尤物884a| 亚洲va欧美va人人爽| 日韩欧美久久久| 国产精品一二二区| 中文字幕永久在线不卡| 色偷偷成人一区二区三区91| 香蕉久久一区二区不卡无毒影院 | 亚洲日本在线a| 欧美日韩午夜精品| 久久成人18免费观看| 欧美国产精品v| 色av一区二区| 老司机一区二区| 中文字幕一区二区三区在线不卡 | av成人老司机| 亚洲国产综合91精品麻豆| 日韩欧美国产一二三区| 懂色av一区二区夜夜嗨| 亚洲成人免费视频| 久久久久久久国产精品影院| 色婷婷综合久色| 极品美女销魂一区二区三区 | 午夜精品久久久久久久99樱桃| 欧美一区二区视频在线观看| 国产91在线观看| 亚洲国产中文字幕| 国产欧美久久久精品影院| 欧美自拍偷拍午夜视频| 极品少妇xxxx精品少妇偷拍| 亚洲少妇30p| 精品久久五月天| 日本二三区不卡| 国产精品一区二区果冻传媒| 午夜精品久久久久久不卡8050| 久久精品亚洲精品国产欧美kt∨| 欧美性一区二区| 成人精品小蝌蚪| 六月丁香综合在线视频| 亚洲美女视频在线| 国产三级一区二区三区| 欧美精品高清视频| 99vv1com这只有精品| 国产一区日韩二区欧美三区| 亚洲午夜精品久久久久久久久| 国产日韩精品一区二区三区在线| 欧美日本在线看| 91污片在线观看| 国产91精品久久久久久久网曝门 |