From 82d412993e1cbd2ec0ecd1ad581d2d1593f18e5f Mon Sep 17 00:00:00 2001 From: Justin Foell Date: Fri, 24 Jun 2016 17:25:57 -0500 Subject: [PATCH] Fixed errors in get public IP --- class-get-public-ip.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 );