Help:Web1.GET return Responsecontent=null

Hola a todos,y gracias de antemano.
Estoy reconstruyendo una app que ya tenía en app inventor. Al usar el componente Web para descargar datos con un php, me he dado cuenta que no funciona correctamente, me da una respuesta"null".
la Url es esta :
https://www.buzoneogps.com/login.php?usuario=Damar&password=2014
El resultado es este:
[“290010357”,“6”,“DAVID”,“29001”]
En app inventor funciona, pero en kodular me da null. ¿Que puedo hacer?
Gracias!!

Please, the official language of the community is English.
Show us your blocks.

1 Like

Hello everybody and thanks in advance.
I am rebuilding an app that I already had in app inventor. When using the web component to download data with a php, I have noticed that it does not work correctly, it gives me a “null” response.
the Url is this:
https://www.buzoneogps.com/login.php?usuario=Damar&password=2014 1
The result is this:
[“290010357”, “6”, “DAVID”, “29001”]
In inventor app it works, but in kodular it gives me null. What I can do?
Thank you!!
(Google translator)
blocks (1)

as test in the Web.GotText event you might want to display the result content directly in a label to find out, what is going on
Taifun

1 Like

Try to use web viewer
web viewer goto url : your url

use evaluate Jscript :
eg : document.getElementById(").innerHTML; //Its optional. more read

After evaluateJS set lablel text to result.

Hello
I have tried both suggestions and they all give null.
The server throws an error in php:
AH01071: Got error ‘PHP message: PHP Warning: array_merge (): Argument # 1 is not an array in /var/www/vhosts/buzoneogps.com/httpdocs/login.php on line 38 \ n’
This is my php:
while ($row = mysqli_fetch_array($result)){
$orden=$row[‘id’];
$orden=$row[‘tipousuario’];
$orden=$row[‘nombre’];
$orden=$row[‘idadmin’];
}

	$resultData = $orden;

$usuarios = json_encode(array_merge($resultData));
echo $usuarios;
What is curious is that the file does not throw any error in the current versions made with app inventor.

Thank you very much sugarlesscreator.
Thank you very much Taifun. You’ve been helping me for years.

The url returns content just fine in a computer browser and in App Inventor

image

Did you declare your variable as string somewhere?
$orden = " "; ?
and are you trying to use it as an array?
Or are you filling in $result ? Select command Result.

Before while command :
echo var_dump($result);
print_f($result);
die();

Good morning, I’ve finally gotten it to work by removing array_merge, it was useless.
Many thanks to Rogerio_Rios and TimAi2, you are the best!

Where It was?

After While command.

Here in post ?

No, on php file

1 Like

Ok. In PHP script you debugged How i
as i suggested.

:thumbsup:

Yes, thank you! :wink:

1 Like