I have big troubles dealing with a website I want to make a searchfunction for. It is a ranking in an online game, but the searchoptions are not enough for my alliance. Thus I want to make an ajax call getting the information needed, but there are several problems depending on what I tried:
I personally am able to open the site directly correct (like www.onlinegamesite.com/api/?foo=foo&boo=false), if I'm able to open it in the browser, why am I unable to make it work pure programmatically?
I hope you have ideas how to deal with it, there are way too much threads about it in the WWW and after a day finding and trying again and again I finally hope for help in here.
EDIT: My current code is this one: (Trying for JSONP)
$(document).ready(function() {
var data = $.ajax({
url: "http://lastchaos.gamigo.com/de/ranking/api/?tabNam=realm_4&CurrLang=de&CurrCategorie=user&sEcho=1&iColumns=6&sColumns=&iDisplayStart=0&iDisplayLength=1025&sSearch=&bRegex=false&sSearch_0=&bRegex_0=false&bSearchable_0=true&sSearch_1=&bRegex_1=false&bSearchable_1=true&sSearch_2=&bRegex_2=false&bSearchable_2=true&sSearch_3=&bRegex_3=false&bSearchable_3=true&sSearch_4=&bRegex_4=false&bSearchable_4=true&sSearch_5=&bRegex_5=false&bSearchable_5=true&iSortingCols=1&iSortCol_0=0&sSortDir_0=asc&bSortable_0=true&bSortable_1=true&bSortable_2=true&bSortable_3=true&bSortable_4=true&bSortable_5=true",
dataType: "jsonp"
});
});
My last try before was some simple JSON Call, but I was unable to debug it properly (Couldn't stop FF filtering XSS while IE has no proper debugtools):
$(document).ready(function() {
var data = $.getJSON({
url: "http://lastchaos.gamigo.com/de/ranking/api/?tabNam=realm_4&CurrLang=de&CurrCategorie=user&sEcho=1&iColumns=6&sColumns=&iDisplayStart=0&iDisplayLength=1025&sSearch=&bRegex=false&sSearch_0=&bRegex_0=false&bSearchable_0=true&sSearch_1=&bRegex_1=false&bSearchable_1=true&sSearch_2=&bRegex_2=false&bSearchable_2=true&sSearch_3=&bRegex_3=false&bSearchable_3=true&sSearch_4=&bRegex_4=false&bSearchable_4=true&sSearch_5=&bRegex_5=false&bSearchable_5=true&iSortingCols=1&iSortCol_0=0&sSortDir_0=asc&bSortable_0=true&bSortable_1=true&bSortable_2=true&bSortable_3=true&bSortable_4=true&bSortable_5=true",
type: "json"
});
});
You can do this by using this option