|
@@ 123-129 (lines=7) @@
|
| 120 |
|
* |
| 121 |
|
* @return \DavidePastore\Ipinfo\Host The Host object with all the info. |
| 122 |
|
*/ |
| 123 |
|
public function getYourOwnIpDetails() |
| 124 |
|
{ |
| 125 |
|
$response = $this->makeCurlRequest($this::BASE_URL.'json'); |
| 126 |
|
$response = $this->jsonDecodeResponse($response); |
| 127 |
|
|
| 128 |
|
return new Host($response); |
| 129 |
|
} |
| 130 |
|
|
| 131 |
|
/** |
| 132 |
|
* Get all the info about an ip address. |
|
@@ 138-144 (lines=7) @@
|
| 135 |
|
* |
| 136 |
|
* @return \DavidePastore\Ipinfo\Host The Host object with all the info. |
| 137 |
|
*/ |
| 138 |
|
public function getFullIpDetails($ipAddress) |
| 139 |
|
{ |
| 140 |
|
$response = $this->makeCurlRequest($this::BASE_URL.$ipAddress); |
| 141 |
|
$response = $this->jsonDecodeResponse($response); |
| 142 |
|
|
| 143 |
|
return new Host($response); |
| 144 |
|
} |
| 145 |
|
|
| 146 |
|
/** |
| 147 |
|
* Get a specific field value. |