我正在尝试使用Volley注册用户。但是,它不是从我的PHP脚本返回回声,而是返回这个奇怪的消息。
<html>
<body>
<script type="text/javascript" src="/aes.js" ></script>
<script>function toNumbers(d){var e=[];d.replace(/(..)/g,function(d){e.push(parseInt(d,16))});return e}function toHex(){for(var d=[],d=1==arguments.length&&arguments[0].constructor==Array?arguments[0]:arguments,e="",f=0;f<d.length;f++)e+=(16>d[f]?"0":"")+d[f].toString(16);return e.toLowerCase()}var a=toNumbers("f655ba9d09a112d4968c63579db590b4"),b=toNumbers("98344c2eee86c3994890592585b49f80"),c=toNumbers("c609cbcc5490135142c37306c3b230b5");document.cookie="__test="+toHex(slowAES.decrypt(c,2,a,b))+"; expires=Thu, 31-Dec-37 23:55:55 GMT; path=/"; document.cookie="referrer="+escape(document.referrer); location.href="http://projectrescyou.byethost15.com/register.php?ckattempt=1";</script>
<noscript>This site requires Javascript to work, please enable Javascript in your browser or use a browser with Javascript support</noscript></body>
</html>
有人知道我的服务器或上传代码是否存在问题?请帮忙
上传代码
private void Register(final String gcm, final String firstname, final String lastname, final String mobile, final String email, final String password){
StringRequest stringRequest = new StringRequest(Request.Method.POST, Constants.REGISTRATION,
new Response.Listener<String>() {
@Override
public void onResponse(String s) {
progressDialog.dismiss();
Toast.makeText(getApplicationContext(),s,Toast.LENGTH_SHORT).show();
Log.d("VOLLEYRESOK",s);
//return message from echo
}
},
new Response.ErrorListener() {
@Override
public void onErrorResponse(VolleyError volleyError) {
progressDialog.dismiss();
Toast.makeText(getApplicationContext(),volleyError.toString(),Toast.LENGTH_SHORT).show();
Log.d("VOLLEYRESERR", volleyError.toString());
}
}){
@Override
protected Map<String, String> getParams(){
Map<String,String>params = new HashMap<String,String>();
params.put(Constants.params_email,email);
params.put(Constants.params_firstname,firstname);
params.put(Constants.params_lastname,lastname);
params.put(Constants.params_mobile,mobile);
params.put(Constants.params_password,password);
params.put(Constants.params_pushid,gcm);
params.put(Constants.params_mode,"register");
return params;
}
};
progressDialog.show();
RequestQueue requestQueue = Volley.newRequestQueue(this);
requestQueue.add(stringRequest);
}