AJAX for PHP repository