Skip to content

Commit

Permalink
Update change log and README.md for getWithPrefixLen
Browse files Browse the repository at this point in the history
  • Loading branch information
oschwald committed Sep 27, 2019
1 parent 4f26a83 commit 6fa5e55
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ CHANGELOG
* PHP 5.6 or greater is now required.
* The C extension now supports PHP 8. Pull request by John Boehr.
GitHub #87.
* A new method, `getWithPrefixLen`, was added to the `Reader` class.
This method returns an array containing the record and the prefix
length for that record. GitHub #89.

1.4.1 (2019-01-04)
------------------
Expand Down
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,13 @@ $databaseFile = 'GeoIP2-City.mmdb';

$reader = new Reader($databaseFile);

// get returns just the record for the IP address
print_r($reader->get($ipAddress));

// getWithPrefixLen returns an array containing the record and the
// associated prefix length for that record.
print_r($reader->getWithPrefixLen($ipAddress));

$reader->close();
```

Expand Down

0 comments on commit 6fa5e55

Please sign in to comment.