First of all sorry if the name of the topic isn't the most correct.
Imagine the following code which connects to a PHP file by AJAX.
function get_locales(){
var the_locale = $('#page-add-text').val();
var url = "classes/load_info.php?type=locale&value=" + the_locale;
var all = "";
$.getJSON(url, function(data){
$.each(data, function(index, item){
all += "<li data-name='" + item.value + "'></li>";
});
$("#page-add-listview").html(all);
$("#page-add-listview").trigger("change");
$("#page-add-listview").listview("refresh");
});
}
If people download the page, they will see classes/load_info.php?type=locale&value= + the_locale;
With this they automatically assume that the url is: www.stackoverflow.com/classes/load_info.php?type=locale&value=TESTING;
So, they can view/retrieve what the function prints, plus, they might try to get some bugs. I'm asking for help in know-how of best ways (if there is any..) to avoid this.
Thank you.
[{"locale":"br","month":"april"}]. People could use this on their applications/benefits..etc, but they won't see anything in special.