I am not familiar with Android Coding, I have to convert this code to PHP to get data from this API URL. Can you please help me to write this code in PHP?
public void onClick(View view) {
((InputMethodManager) InputData.this.getSystemService("input_method")).hideSoftInputFromWindow(view.getWindowToken(), 0);
String charSequence = InputData.this.xyzView.getText().toString();
String obj = InputData.this.inputOne.getText().toString();
String obj2 = InputData.this.inputTwo.getText().toString();
if (obj.equalsIgnoreCase("") || Integer.parseInt(obj) != 0) {
if (obj2.equalsIgnoreCase("")) {
obj2 = "0";
}
if (obj.equalsIgnoreCase("")) {
InputData InputData = InputData.this;
Toast.makeText(InputData, InputData.getString(R.string.err_msg_fileNo), 1).show();
return;
}
InputData InputData2 = InputData.this;
JSONObject jSONObject = new JSONObject();
try {
jSONObject.put("xyz", charSequence);
jSONObject.put("inputOne", obj);
jSONObject.put("inputTwo", obj2);
jSONObject.put("reqFrom", "0123");
jSONObject.put("password", "MjMEJJ6SXpj");
} catch (JSONException e) {
e.printStackTrace();
}
InputData2.URL = "https://apiurl.com/information/service/dataservide/";
Log.d("ur;", InputData.this.URL);
new C0328e(InputData.this, (C0324a) null).execute(new String[]{InputData.this.URL, jSONObject.toString()});
return;
}
Toast.makeText(InputData.this, "Invalid Input", 1).show();
Also give suggestions if you have any. Thank you so much, Friends.