-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsynergywholesale.php
executable file
·49 lines (43 loc) · 1.28 KB
/
synergywholesale.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<?php
ini_set("display_errors", "On");
error_reporting(E_ALL | E_STRICT);
// command line support
if (isset($argv[1])) {
$_GET["domain"] = $argv[1];
}
$_GET = filter_var_array($_GET, ["domain" => FILTER_SANITIZE_STRING]);
if ($_GET && !$_GET["domain"]) {
echo "Please enter a domain name";
return;
}
$full_domain = strtolower(trim($_GET["domain"]));
$url = "https://manage.synergywholesale.com/whmcs_availability_checker.php";
$timeout = 20.0;
$data = http_build_query(["domain" => $full_domain]);
$options = [
"http" => [
"method" => "GET",
"protocol_version" => 1.1,
"timeout" => $timeout,
"user_agent" => "tld-checker/1.0",
"header" => "Accept-language: en\r\n" .
"Accept: text/plain\r\n"
]
];
$context = stream_context_create($options);
$response = file_get_contents($url . "?" . $data);
if ($response === false) {
echo "Unknown Error";
return;
}
if (!!stristr($response, "Unavailable")) {
echo "Registered<br>Whois info at: whois.auda.org.au";
return;
} else if (!!stristr($response, "Access Denied")) {
echo "Access Denied";
return;
} else if (!!stristr($response, "Available")) {
echo "Not Found";
return;
}
echo "Unknown Response";