- Fixed
Undefined array keywarnings incheck()by reading results from the API response body instead of the wrapper array, which also fixes proxy, VPN and other detection blocks not firing. - Fixed
blockandblock_reasonnot being initialised, soBLOCKED_COUNTRIESnow applies to IPs with no matching detection. - Fixed warnings on missing address, detection, location and disposable-email fields by making those reads null-safe.
- Fixed loose country matching by using strict
in_array()comparison. - Fixed
rules()building a broken POST body by usinghttp_build_query(), andRULE_ENTRIESnow accepts either a string or an array. - URL-encoded
ips,tagand listdatavalues in POST bodies, and encodedAPI_KEY,DAY_RESTRICTORand URL path segments in all functions. - Cast
LIMITandOFFSETto integers instats(), with safe defaults for invalid or negative values. - Switched the HMAC signature comparison to
hash_equals(), and an HMAC key that isn't 64 characters now returns an error instead of silently disabling verification. check()now returns the real cURL or JSON error before the HMAC step, andlisting(),rules()andstats()return an error array on failure instead ofnull.- Tagging no longer warns under CLI or cron, because
SERVER_NAMEandREQUEST_URIfall back to empty strings. - Renamed the host detection option to
OPTION_HOSTING_DETECTIONto match the v3 response key, keepingOPTION_HOST_DETECTIONas a backwards-compatible alias.
- Added a default user agent to the makeRequest function, allowing for library targeting by the API based on version to maximise compatibility.
- Added support for custom CURL options to all functions and two custom timeout values
- Added support for HMAC (Hash-based Message Authentication Code) to the main address check function.
- Corrected an issue where block and block_reason variables would not be supplied under certain circumstances.
- New major version which changes the proxycheck.io API in use from v2 to v3. This is a breaking change, do not upgrade without reading the UPGRADE.md first.
- Corrected an undefined variable error when supplying a blank RULE_SELECTION.
- Adds support for manipulating Custom Rules via the library.
- Improved the reliability of sending addresses to the API by always using the POST method. This now applies to sending a singular address in addition to multiple addresses.
- Corrected an exception when checking an IP which doesn't have Country data available.
- Added full support for checking email addresses in addition to ip addresses.
- Added support for checking multiple addresses in a single request by passsing an array as the $ip variable instead of a string.
- Moves around the required and optional parameters for our makeRequest() function to support PHP8+ which has deprecated our previous implementation.
- Corrected an issue where custom tags wouldn't be sent with requests. This bug was introduced by the 0.1.6 release.
- Updated code formatting to meet PSR-12 specifications.
- Improved the cURL implementation with GET/POST method arguments.
- Corrected an issue where omitting the DAY_RESTRICTOR within your options array would cause your API Key to not be sent with your requests.
- Added better protection against absent parameters in array options.
- Added a new query flag: risk which lets you view both risk scores and attack history for IP Addresses.
- Added a new function called stats which allows you to view the stats from your dashboard using our official dashboard API's
- Updated the check function to support a new option array called ALLOWED_COUNTRIES so you can do local country based whitelisting.
- Updated the COUNTRIES feature to allow isocodes to be used in addition to country names.
- Improved the classes handling of errors when options were not supplied in the options array.
- Added a new function called listing which allows you to view and modify your whitelist and blacklist using our official dashboard API.
- Added Last Seen, Port and Node flags to the query library.
- Updated README.md with new description of the library and altered the example result array to include new flag responses.
- Updated composer.json changing "type" from project to library.
- Initial release.