Skip to main content
1 of 8
Sky Sanders
  • 12.1k
  • 3
  • 32
  • 60

Early Bird Bonus - find out who voted you up/down - will self destruct in 3...2...

Dont try this on a site with more than a few thousand users. really. deleting this post in 10 minutes.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>

    <script src="http://soapi.info/code/js/stable/scripts/Soapi.js" type="text/javascript"></script>

    <script type="text/javascript">
        // Soapi JavaScript Library
        // http://stackapps.com/questions/494
        // http://soapi.info/

        var apiKey = 'qgAq_KfDu0KYzlNG-qaTuw';
        function init() {
            var table = document.createElement("table");
            document.body.appendChild(table);
            Soapi.RouteFactory("api.stackapps.com", apiKey).Users()
            .getPagedResponse(function(data) {
                for (var i in data.items.sort(function(a, b) { return b.last_access_date - a.last_access_date })) {

                    var row = table.appendChild(document.createElement("tr"));

                    var cell = document.createElement("td");
                    cell.innerHTML = Soapi.Utilities.getTimeAgo(data.items[i].last_access_date);
                    row.appendChild(cell);

                    cell = document.createElement("td");
                    cell.innerHTML = data.items[i].display_name;
                    row.appendChild(cell);
                }
            }, null, function(data) { document.getElementById("status").innerHTML = "Page " + data.page + " of " + (Math.floor(data.total / data.pagesize) + 1) });
        };
    </script>

</head>
<body onload="init()">
    <p>
        Dont try this on stack overflow or really any other site with more than a couple
        thousand users. Really</p>
    <div id="status">
    </div>
</body>
</html>
Sky Sanders
  • 12.1k
  • 3
  • 32
  • 60