2
我有一個PHP的AJAX請求,但它沒有返回正確的數據。PHP AJAX POST獲取錯誤的數據
我的AJAX請求:
$.ajax({
type: "POST",
url: 'http://www.boomlings.com/database/getGJUserInfo20.php',
contentType: 'application/x-www-form-urlencoded',
dataType: "text",
crossDomain: true,
data: {
gameVersion: 20,
binaryVersion: 29,
str: 'Nexrem',
page: 0,
total: 0,
secret: 'Wmfd2893gb7'
},
success: function (response) {
console.log('success:')
console.log(response)
},
error: function(erresponse){
console.log('error:')
console.log(erresponse)
}
});
這個總是返回-1
而不是數據串。
我俘獲了我的AJAX請求的數據包和工作的請求(官方客戶端)
礦左側和官員的權利。
官方似乎收到的數據字符串,但我沒有。我不確定我可能會做錯什麼。
我也可以提供我正在與之通信的PHP,但請注意,我不能也不會修改它。 https://github.com/Cvolton/GMDprivateServer/blob/master/getGJUserInfo20.php
返回-1其中? in'console.log(response)'?你在哪裏發送在那個鏈接的php中使用的「targetAccountID」? – Jeff
@Jeff是在控制檯日誌中。不,str是targetAccountID。我大多被一個python腳本引用,它可以實現這一點並且可以工作。 http://pastebin.com/Hauy0uJu – meganukebmp
那麼它可能是錯誤是數據庫?也許connection.php返回-1並停止腳本已經? – Jeff