Answer the question
In order to leave comments, you need to log in
The question is how to return result[2], result[1] and result[0] through PHP?
The question is how to return result[2] , result[1] and result[0]
through PHP ?
protected String doInBackground(Void... params) {
String text = BuildConfig.FLAVOR;
try {
String[] result = EntityUtils.toString(new DefaultHttpClient().execute(new HttpGet("http://everest-vann.ru/progmob.php?id=" + MainActivity.this.id + "&hash=" + Utils.md5(MainActivity.this.id + "sosibizu"))).getEntity()).replace("\n", BuildConfig.FLAVOR).split("\\;");
text = result[2] + result[1] + result[0];
if (Integer.parseInt(result[2]) == 1) {
MainActivity.this.sunduk = Boolean.valueOf(true);
}
if (Integer.parseInt(result[1]) == 1) {
MainActivity.this.tour = Boolean.valueOf(true);
}
if (result[0].equals("ok")) {
MainActivity.this.race = Boolean.valueOf(true);
}
result[0] = EntityUtils.toString(new DefaultHttpClient().execute(new HttpGet("http://everest-vann.ru/prog.php?id=888")).getEntity()).replace("\n", BuildConfig.FLAVOR);
return text;
} catch (Exception e) {
return "ez";
}
}
Answer the question
In order to leave comments, you need to log in
.replace("\n", BuildConfig.FLAVOR).split("\\;")
<?php
$data = [
'0\\;',
'1\\;',
'2\\;'
];
$text = imlode('\\;', $data); //операция обратная .split()
echo $text;
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question