使用PHP和MySQL的AJAX长请求

I have a big database that I would test if every profile picture is working or not. I am using Bootstrap as framework.

To avoid the time out, I want to use AJAX and show the progress in real time. But I have no idea if I can make it with Boostrap? Does bootstrap have a method to make it ?

I have this on my PHP Script

<?php
function getPictures() {
     return $this->_db->select("SELECT picture FROM members");
}

function checkPicture($url) {
     if(Curl::get($url))
         return true;
     else
         return false;
}

But how to make the AJAX part?