whois

FREE
By Whois XML API | Updated 4일 전 | Database
Popularity

9.1 / 10

Latency

1,803ms

Service Level

100%

Health Check

N/A

Back to All Discussions

how to add this api to my wordpress site

Rapid account: Neteater
neteater
9년 전

hi, i am new to coding, i am webdesigenr basically, i want to add this whois utility to my website, i have got this code to consume api to my site, but its returing nothing, can you please help me to undersatnd what actually i need to do

<!DOCTYPE html>
<html>
<head>
<script src="//code.jquery.com/jquery-2.1.1.min.js"></script>
<meta charset=“utf-8”>
<title>Mashape Query</title>
<script>
function doIt() {
var output = $.ajax({
url: ‘https://whoisapi.p.mashape.com/whoisserver/WhoisService/’, // The URL to the API. You can get this by clicking on “Show CURL example” from an API profile
type: ‘GET’, // The HTTP Method, can be GET POST PUT DELETE etc
data: {}, // Additional parameters here
datatype: ‘json’,
success: function(data) {
//
//Change data.source to data.something , where something is whichever part of the object you want returned.
//To see the whole object you can output it to your browser console using:
//console.log(data);
document.getElementById(“output”).innerHTML = data.source;
},
error: function(err) { alert(err); },
beforeSend: function(xhr) {
xhr.setRequestHeader(“X-Mashape-Authorization”, “NGP5QfAyXsmshVdV7s24gf92dXbYp1NwtHqjsnP3mP3BGBxCID”); // Enter here your Mashape key
}
});

}

</script>
</head>
<body>

<button onclick=“doIt()”>Run the request</button>
<div id=“output”>The API request is:</div>

</body>

Rapid account: Whoisapi
whoisapi Commented 9년 전

we have sample code here that you might find helpful:
https://www.whoisxmlapi.com/whois-api-doc.php#sample_code
Sorry we can’t see your code, it’s not formatted correctly.

Rapid account: Neteater
neteater Commented 9년 전

sorry i am not able to parse the code, its excuting itself, the same way on my site, but i am not getting any search box to type in domain.

Join in the discussion - add comment below:

Login / Signup to post new comments