Block web erreur 1101 : Unable to get a response with the specified URL

bonjour ,

je ne comprend pas mon erreur , je recupere du json via un url , qui retourne bien : [{"tag":"342G"}] ,

mais j'ai cette erreur : 1101 : Unable to get a response with the specified URL

alors que je recupere bien le .json , mon code php est le meme qu'un autre appel qui fonctionne mais celui la non ??

merci de m'aider , cordialement

Please show your relevant blocks, and an example of your php file.

$sql = "
SELECT * 
FROM padel_court 
WHERE resa='$id'
";
$result = $conn->query($sql);

$disponibilites = [];

if ($result && $result->num_rows > 0) {
    while ($row = $result->fetch_assoc()) {
        $disponibilites[] = [
			"tag"  => $row['tagm']
        ];
    }
}

// Fermer la connexion
$conn->close();

// Retourner les dates en JSON
header('Content-Type: application/json');
echo json_encode($disponibilites);

You did not show your web request (Get/Post ?) blocks

yes
Capture d'écran 2025-06-17 184130

Use Do it and show us the Do it result

The first parameter needs to be added with a ?
For example

...padellist.php?nom1=one&n2=two&d2=three

Use the companion app and Do it to debug your blocks, see also tip 4 here App Inventor: How to Learn | Pura Vida Apps
see also Live Development, Testing, and Debugging Tools

Taifun


Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by icon24 Taifun.

link : https://id-development.com/chm/padellist.php?security=####&nom1=one&n2=two&d2=three

result web : [{"tag":"342G"}]

You do not show how you are handling those parameters in your php file?

You are certain the error arises from calling Web4 ? (You are not calling Web1/2/3 at the same time?)

It does not make sense for you to get a valid response from your server, AND for AppInventor to be unable to get a response from the url.

1 Like

Is this your padellist.php ?
$sql = "
SELECT *
FROM padel_court
WHERE resa='$id'
";
$result = $conn->query($sql);

$disponibilites = ;

if ($result && $result->num_rows > 0) {
while ($row = $result->fetch_assoc()) {
$disponibilites = [
"tag" => $row['tagm']
];
}
}

// Fermer la connexion
$conn->close();

// Retourner les dates en JSON
header('Content-Type: application/json');
echo json_encode($disponibilites);

Why Your where clause in your select contains only one parameter and your URL four ?
It is very strange that it returns complete content ({"tag":"342G" })and this error message appears.

the settings as a security response, it checks the user for anyone to push to use the link

What I'm asking is that in the url you created there are 3 parameters + a token and it calls the php script padellit.php. And the content of padellist.php that you showed, the SQL command uses only 1. So this is just a part of the script, and not the complete content of the script, right?

:https://id-development.com/chm/padellist.php?security=####&nom1=one&n2=two&d2=three Does this link directly in the browser return [{"tag":"342G"}] ?

if ($result && $result->num_rows > 0)
 {
    while ($row = $result->fetch_assoc())
    {
        $disponibilites[] = [
			"tag"  => $row['tagm']
        ];
    }
} else {
    $disponibilites[] = [
        "tag" => "error: No data found for the provided ID."
    ];
}

and do a test to force the error.....