芝麻web文件管理V1.00
编辑当前文件:/home/r5772835/public_html/dina.ycreate.jp/wp-content/plugins/siteguard/classes/siteguard-base.php
= $long_start && $long_ip <= $long_end ) { return true; } } } return false; } function get_server_ip() { if ( isset( $_SERVER['SERVER_ADDR'] ) ) { $ip = sanitize_text_field( $_SERVER['SERVER_ADDR'] ); if ( false === $this->is_private_ip( $ip ) ) { if ( preg_match( '/[0-9.:]+/', $ip ) ) { return $ip; } } } $url = 'http://inet-ip.info/ip'; $options = array( 'http' => array( 'method' => 'GET', 'timeout' => 2, ), ); $ip = file_get_contents( $url, false, stream_context_create( $options ) ); if ( false !== $ip ) { if ( preg_match( '/[0-9.:]+/', $ip ) ) { return $ip; } } $host = parse_url( home_url(), PHP_URL_HOST ); if ( false !== $host && null !== $host ) { putenv( 'RES_OPTIONS=retrans:1 retry:1 timeout:2 attempts:1' ); $ip = gethostbyname( $host ); if ( $ip !== $host ) { if ( '127.0.0.1' !== $ip && '::1' !== $ip ) { if ( preg_match( '/[0-9.:]+/', $ip ) ) { return $ip; } } } } return false; } function get_ip() { if ( ! isset( $_SERVER['REMOTE_ADDR'] ) || ! is_string( $_SERVER['REMOTE_ADDR'] ) || '' === $_SERVER['REMOTE_ADDR'] ) { throw new MyPluginBrokenEnvironment( 'Your webserver is misconfigured. REMOTE_ADDR is not set.' ); } return sanitize_text_field( $_SERVER['REMOTE_ADDR'] ); } }