restugbk/get-contact
最新稳定版本:v1.0.0
Composer 安装命令:
composer require restugbk/get-contact
包简介
PHP Class for fetching GetContact phone number tags (Unofficial)
README 文档
README
[Un-Official] A lightweight, Un-Official PHP Library for validating phone numbers and retrieving tags from the GetContact API. Designed to be framework-agnostic, efficient, and easy to integrate.
📦 Installation
Install the package via Composer:
composer require restugbk/get-contact
1. Basic Initialization
use Restugbk\GetContact; $token = 'YOUR_TOKEN'; $finalKey = 'YOUR_FINAL_KEY'; $getContact = new GetContact($token, $finalKey);
2. Validate Number of Tags
$number = '081234567890'; $response = $getContact->checkNumber($number); if ($response['success']) { echo "Validated Number: " . $response['number'] . "\n"; echo "Tags: " . implode(', ', $response['tags']) . "\n"; } else { echo "Error: " . $response['message'] . "\n"; }
3. Search Profile by Validated Number
$number = '081234567890'; $response = $getContact->searchNumber($number); if ($response['success']) { echo "Validated Number: " . $response['number'] . "\n"; echo "Profile: " . implode(', ', $response['profile']) . "\n"; } else { echo "Error: " . $response['message'] . "\n"; }
📋 Data Structure Reference
The checkNumber() method returns an array with the following keys:
| Key | Type | Description |
|---|---|---|
success |
Boolean | Indicates whether the request was successful. |
number |
String | Normalized phone number (e.g., +6281234567890). |
tags |
Array | List of tags associated with the number. |
raw |
Array | Full raw response from the API (decrypted JSON). |
🔑 How to Get Token
Requirements: Android with ROOT-rights (or emulator).
- Install and login into GetContact app.
- Open file manager on your phone and navigate to:
/data/data/app.source.getcontact/shared_prefs/GetContactSettingsPref.xml
- Inside the file, you will find:
YOUR_TOKEN = TOKEN / CHAT_TOKEN YOUR_FINAL_KEY = FINAL_KEY
🤝 Contributing
Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project.
- Create your Feature Branch (
git checkout -b feature/AmazingFeature). - Commit your Changes (
git commit -m 'Add some AmazingFeature'). - Push to the Branch (
git push origin feature/AmazingFeature). - Open a Pull Request.
📄 License
This open-source software is distributed under the MIT License. See LICENSE for more information.
🛠 Support
If you found this project helpful, please give it a ⭐ star!
For issues and questions, please create an issue in the GitHub repository.
统计信息
- 总下载量: 3
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 7
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-01-09