$apiUrl, CURLOPT_RETURNTRANSFER => true, CURLOPT_SSL_VERIFYPEER => true, CURLOPT_SSL_VERIFYHOST => 2, CURLOPT_TIMEOUT => 15, CURLOPT_VERBOSE => true, CURLOPT_STDERR => $verbose = fopen('php://temp', 'w+'), CURLOPT_HTTPHEADER => [ 'User-Agent: PhoneLookupClient/1.0', 'Accept: application/json' ] ]); $response = curl_exec($ch); $http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE); $curl_error = curl_error($ch); rewind($verbose); $verbose_log = stream_get_contents($verbose); fclose($verbose); if ($curl_error || $response === false) { error_log("API Error for $phoneNumber: HTTP $http_code, Error: $curl_error, URL: $apiUrl, Verbose: $verbose_log | File: " . __FILE__ . " | Line: " . __LINE__, 3, LOG_FILE); curl_close($ch); return ['status' => 'error', 'message' => 'API request failed: ' . $curl_error, 'data' => [], 'developed_by' => 'Shadow Innovations']; } error_log("API Response for $phoneNumber: HTTP $http_code | File: " . __FILE__ . " | Line: " . __LINE__, 3, LOG_FILE); curl_close($ch); $data = json_decode($response, true); if (json_last_error() !== JSON_ERROR_NONE) { error_log("JSON Error for $phoneNumber: " . json_last_error_msg() . " | File: " . __FILE__ . " | Line: " . __LINE__, 3, LOG_FILE); return ['status' => 'error', 'message' => 'Invalid API response', 'data' => [], 'developed_by' => 'Shadow Innovations']; } return $data; } // Handle form submission $result = null; $error = null; if ($_SERVER["REQUEST_METHOD"] == "POST" && !empty($_POST['phone'])) { $phoneNumber = trim($_POST['phone']); // Validate phone number (10-12 digits) if (preg_match('/^[0-9]{10,12}$/', $phoneNumber)) { $result = fetchApiData($phoneNumber); if ($result['status'] === 'error') { $error = $result['message']; } } else { $error = "Please enter a valid 10-12 digit phone number."; error_log("Invalid phone number: $phoneNumber | File: " . __FILE__ . " | Line: " . __LINE__, 3, LOG_FILE); } } ?>
1. Enter a valid 10-12 digit phone number (e.g., 03338570120).
2. Click "Search" to retrieve details like Name, CNIC, and Address.
3. To integrate this API into your project, use the endpoint: https://shadowdatabase.site/api.php?token=your_api_token&num=phone_number
.
4. Get your API token from Shadow Database API.
5. Each lookup costs 5 coins. Ensure you have sufficient coins in your account.
Name:
Mobile:
Country:
CNIC:
Address:
Developed by:
No data found or an error occurred: