Sinisterly
Help with a json project - Printable Version

+- Sinisterly (https://sinister.li)
+-- Forum: Coding (https://sinister.li/Forum-Coding)
+--- Forum: Coding (https://sinister.li/Forum-Coding--71)
+--- Thread: Help with a json project (/Thread-Help-with-a-json-project)



Help with a json project - hacxx - 11-27-2017

Hi,

I have release my first json project here https://sinister.li/Thread-Leaked-Email-Checker-Check-if-an-email-was-leaked-online, i tried to replicate the code using the haveibeenpwn api and stopforumspam api but it doesn't work. What i want is to expand the program by adding aditional data but it doesn't work. I'm must be doing something wrong. Can anyone help me?

Haveibeenpwn Json API
https://haveibeenpwned.com/api/breachedaccount/johndue@hotmail.com
https://haveibeenpwned.com/api/v2/pasteaccount/johnsue@hotmail.com

Stopforumspam Json API
http://api.stopforumspam.org/api?email=johndue@hotmail.com&json

Code i'm using
Code:
var xmlhttp = new XMLHttpRequest(); xmlhttp.onreadystatechange = function() { if (this.readyState == 4 && this.status == 200) { var myObj = JSON.parse(this.responseText); document.getElementById("demo").innerHTML = myObj.status; document.getElementById("query").innerHTML = myObj.query; document.getElementById("results").innerHTML = myObj.results; } }; xmlhttp.open("GET", "https://hacked-emails.com/api?q=johndue@hotmail.com", true); xmlhttp.send();

Thanks