Created
February 1, 2018 07:21
-
-
Save anonymous/fc2c0c4c4f1329f88e90b867ce604d24 to your computer and use it in GitHub Desktop.
Api Usage
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script src="http://code.jquery.com/jquery-3.3.1.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script> | |
$.get("http://xmlrpc.sportsontheweb.net/ping.php?title=Website Title&url=http://www.your website.com&md=json").done(function (data) | |
{ | |
console.log(data); //Here you can process the output | |
}); | |
// using XMLHttpRequest | |
var xhr = new XMLHttpRequest(); | |
xhr.open("GET", "http://xmlrpc.sportsontheweb.net/ping.php?title=Website Title&url=http://www.your website.com&md=json", true); | |
xhr.onload = function () { | |
console.log(xhr.responseText);//Here you can process the output | |
}; | |
xhr.send(); | |
// using the Fetch API | |
fetch("http://xmlrpc.sportsontheweb.net/ping.php?title=Website title&url=http://www.website url.com&md=json").then(function (response) | |
{ | |
return response.json();//Here you can process the output | |
}).then(function (json) | |
{ | |
console.log(json); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment