Login Register


Getting Json request to work filter_list
Author
Message
Getting Json request to work #1
Hi,

I want to provide to users a simple method to check if they have currently succefully signup.
To achieve this i'm using a json request that will get the page and show only the elements i want.

Below is a generic json request script that i have use in the past for lists.
Code:
<script> var xmlhttp = new XMLHttpRequest(); xmlhttp.onreadystatechange = function() { if (this.readyState == 4 && this.status == 200) { var myObj = JSON.parse(this.responseText); document.write('<center><table><tr><td>'); for (x in myObj.matches) { document.write(''+ myObj.matches[x].ip_str +'<br>'); } document.write('</td></tr></table></center>'); } }; xmlhttp.open("GET", "https://www.example.com", true); xmlhttp.send(); </script>

I want to use the code above to get the code below and only show some elements

Code:
[{"banner_type":null,"id":"2162875","campid":"8909","ip":"154.69.47.83","subid":"","subid2":"","subid3":"","earn":"300.0","ddate":"2018-04-05","dtime":"02:36:11","ustamp":1491377771,"preid":null,"gateid":"1310615","country":"US","currency":"USD","banner_id":"0","type":"CPC"}, {"banner_type":null,"id":"2155364","campid":"10357","ip":"111.125.111.139","subid":"","subid2":"","subid3":"","earn":"0.80","ddate":"2018-04-04","dtime":"08:29:26","ustamp":1491312566,"preid":null,"gateid":"1310615","country":"PH","currency":"USD","banner_id":"0","type":"CPC"}]

I just want to show the user some elements like ip, earn, ddate and country.

Thanks

Reply





Messages In This Thread
Getting Json request to work - by hacxx - 04-09-2018, 02:00 PM
RE: Getting Json request to work - by drxddock - 04-09-2018, 03:20 PM
RE: Getting Json request to work - by Pikami - 04-09-2018, 03:29 PM
RE: Getting Json request to work - by hacxx - 04-09-2018, 04:25 PM
RE: Getting Json request to work - by Pikami - 04-09-2018, 04:58 PM
RE: Getting Json request to work - by hacxx - 04-09-2018, 06:02 PM
RE: Getting Json request to work - by Pikami - 04-09-2018, 06:22 PM
RE: Getting Json request to work - by hacxx - 04-09-2018, 06:45 PM
RE: Getting Json request to work - by drxddock - 04-09-2018, 08:32 PM
RE: Getting Json request to work - by Pikami - 04-09-2018, 08:40 PM
RE: Getting Json request to work - by hacxx - 04-10-2018, 02:56 PM
RE: Getting Json request to work - by Pikami - 04-10-2018, 04:20 PM
RE: Getting Json request to work - by Synthx - 04-10-2018, 06:07 PM
RE: Getting Json request to work - by Pikami - 04-10-2018, 06:18 PM
RE: Getting Json request to work - by Blink - 04-11-2018, 03:37 PM
RE: Getting Json request to work - by Synthx - 04-10-2018, 06:45 PM
RE: Getting Json request to work - by phyrrus9 - 04-11-2018, 12:49 AM
RE: Getting Json request to work - by Pikami - 04-11-2018, 09:52 AM



Users browsing this thread: 1 Guest(s)