{"id":40622607,"url":"https://github.com/abstractapi/php-phone-validation","last_synced_at":"2026-01-21T07:04:44.797Z","repository":{"id":56939711,"uuid":"354110997","full_name":"abstractapi/php-phone-validation","owner":"abstractapi","description":"PHP library for Abstract's IP Geolocation API (free)","archived":false,"fork":false,"pushed_at":"2021-04-15T17:36:40.000Z","size":16,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-22T10:40:45.195Z","etag":null,"topics":["api","phone-api","phone-authentication","phone-validation","phone-verification","php-library","verify-phone-numbers"],"latest_commit_sha":null,"homepage":"https://www.abstractapi.com/phone-validation-api","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/abstractapi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-04-02T19:12:04.000Z","updated_at":"2025-04-09T11:18:55.000Z","dependencies_parsed_at":"2022-08-21T06:50:54.099Z","dependency_job_id":null,"html_url":"https://github.com/abstractapi/php-phone-validation","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/abstractapi/php-phone-validation","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abstractapi%2Fphp-phone-validation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abstractapi%2Fphp-phone-validation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abstractapi%2Fphp-phone-validation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abstractapi%2Fphp-phone-validation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/abstractapi","download_url":"https://codeload.github.com/abstractapi/php-phone-validation/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abstractapi%2Fphp-phone-validation/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28629250,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-21T04:47:28.174Z","status":"ssl_error","status_checked_at":"2026-01-21T04:47:22.943Z","response_time":86,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","phone-api","phone-authentication","phone-validation","phone-verification","php-library","verify-phone-numbers"],"created_at":"2026-01-21T07:04:44.101Z","updated_at":"2026-01-21T07:04:44.780Z","avatar_url":"https://github.com/abstractapi.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AbstractAPI php-phone-validation library\n\nIntegrate the powerful [Phone Validation API from Abstract](https://www.abstractapi.com/phone-validation-api) in your PHP project in a few lines of code.\n\nAbstract's Phone Number Validation and Verification API is a fast, lightweight, modern, and RESTful JSON API for determining the validity and other details of phone numbers from over 190 countries.\n\nIt's very simple to use: you only need to submit your API key and a phone number, and the API will respond as assessment of its validity, as well as additional details like the carrier details, line type, region and city details, and more.\n\nValidating and verifying phone numbers is a critical step to reducing the chances of low quality data and fraudulent or risky users in your website or application.\n\n# Documentation\n\n## Supported PHP Versions\n\nThis library supports the **PHP version 5.6** and higher.\n\n## Installation\n\nYou can install **php-phone-validation** via composer or by downloading the source.\n\n### Via Composer:\n\n**php-phone-validation** is available on Packagist as the\n[`abstractapi/php-phone-validation`](https://packagist.org/packages/abstractapi/php-phone-validation) package:\n\n```bash\ncomposer require abstractapi/php-phone-validation\n```\n\n## API key\n\nGet your API key for free and without hassle from the [Abstact website](https://app.abstractapi.com/users/signup?target=/api/phone-validation/pricing/select).\n\n## Quickstart\n\n### Verify phone\n\n```php\n// Verify phone using Abstract's Phone  Validation and Verification API and PHP\n\u003c?php\n$api_key = \"YYYYYY\"; // Your API Key from https://app.abstractapi.com/api/phone-validation/documentation\n\nAbstractapi\\PhoneValidation\\AbstractPhoneValidation::configure($api_key);\n\n$info = Abstractapi\\PhoneValidation\\AbstractPhoneValidation::verify('+14152007986');\n\nprint $info-\u003ecountry-\u003ecode;\n\n```\n\n## API response\n\nThe API response is returned in a `IpGeolocationData` object.\n\n| PARAMETER | TYPE | DETAILS |\n| - | - | - |\n| number | String | The phone number submitted for validation and verification. |\n| valid | Boolean | Is true if the phone number submitted is valid. |\n| local_format | String | The local or national format of the submitted phone number. For example, it removes any international formatting, such as \"+1\" in the case of the US. |\n| international_format | String | The international format of the submitted phone number. This means appending the phone number's country code and a \"+\" at the beginning. |\n| country_name | String | The name of the country in which the phone number is registered. |\n| country_code | String | The country's two letter ISO 3166-1 alpha-2 code. |\n| country_prefix | The country's calling code prefix. |\n| registered_location | String | As much location details as are available from our data. This can include the region, state / province, and in some cases down to the city. |\n| carrier | String | The carrier that the number is registered with. |\n| line_type | String | The type of phone number. The possible values are: Landline, Mobile, Satellite, Premium, Paging, Special, Toll_Free, and Unknown. |\n\n## Detailed documentation\n\nYou will find additional information and request examples in the [Abstract help page](https://app.abstractapi.com/api/phone-validation/documentation).\n\n## Getting help\n\nIf you need help installing or using the library, please contact [Abstract's Support](https://app.abstractapi.com/api/phone-validation/support).\n\nFor bug report and feature suggestion, please use [this repository issues page](https://github.com/abstractapi/php-phone-validation/issues).\n\n# Contribution\n\nContributions are always welcome, as they improve the quality of the libraries we provide to the community.\n\nPlease provide your changes covered by the appropriate unit tests, and post them in the [pull requests page](https://github.com/abstractapi/php-phone-validation/pulls).\n\n## Composer\n\nTo work on the source code, you need to install composer on your local computer. At the time of writing, the latest version of composer is v2.0.12. The installation instructions can be found here: https://getcomposer.org/download/.\n\n## Setup\n\nTo install the requirements, run:\n\n```bash\ncomposer install --prefer-source --no-interaction --ignore-platform-reqs\n```\n\nOnce you implementer all your changes and the unit tests, run the following command to run the tests:\n\n```bash\nphp vendor/bin/phpunit\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabstractapi%2Fphp-phone-validation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabstractapi%2Fphp-phone-validation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabstractapi%2Fphp-phone-validation/lists"}