Use the following PHP script to integrate the API in your application:
<?php
$api_url = "https://api.sahilbilal.site/api.php";
$api_key = "000";
$domain = "example.com";
$request_url = "{$api_url}?api={$api_key}&domain={$domain}";
$response = file_get_contents($request_url);
$data = json_decode($response, true);
if ($data) {
echo "<pre>" . json_encode($data, JSON_PRETTY_PRINT) . "</pre>";
} else {
echo "<p style='color:red;'>Failed to fetch API response.</p>";
}
?>
https://api.sahilbilal.site/api.php
GET
Parameter | Type | Required | Description |
---|---|---|---|
api |
string | Yes | Your API key (e.g., 000 ). |
domain |
string | Yes | The domain name to check (e.g., example.com ). |
{ "domain": "example.com", "status": "success", "message": "Domain is available!", "is_available": true, "buy_link": "https://www.sahilbilal.site/domains?domain=example.com" }
{ "domain": "example.com", "status": "fail", "message": "Domain is already registered.", "is_available": false }
{ "status": "error", "message": "API key or domain is missing." }
GET https://api.sahilbilal.site/api.php?api=000&domain=example.com
{ "domain": "example.com", "status": "success", "message": "Domain is available!", "is_available": true, "buy_link": "https://www.sahilbilal.site/?i=domains&buy=example.com" }
For any issues or queries, contact us at: