diff --git a/class-get-public-ip.php b/class-get-public-ip.php index 47f3f0d..380363e 100644 --- a/class-get-public-ip.php +++ b/class-get-public-ip.php @@ -44,7 +44,7 @@ function __toString() { public function get_ip( $url, $args=array() ) { $defaults = array( 'method' => 'GET', - 'referer'=> $domain, + 'referer'=> $this->domain, 'body' => '', 'index' => 0, ); @@ -58,9 +58,9 @@ public function get_ip( $url, $args=array() ) { ); $response = wp_remote_get( $url, $query_args ); - + if ( ! is_wp_error( $response ) ) { - $body = strip_tags($response['body']); + $body = strip_tags($response->body); preg_match_all( $this->ip_pattern, $body, $matches );