Hi can u help me out?

im trying to send a text using app inventor into my webserver which the php script read the text and then display it, do u have any insight about this?

Do you mean in webviewer?

One of these links might be useful Search results for 'send text' - MIT App Inventor Community

i have setup my own localhost webserver and im trying to send a text message from my app to the server and then my php script would get and print it out, i tried asking chatgpt it gave me a php script like this

<?php if ($_SERVER['REQUEST_METHOD'] == 'POST') { $message = $_POST['message']; // Do something with $message here echo "Received message: " . $message; } else { echo "No message received"; } ?>

which is located in my htdocs

  1. Create this file, named outputText.php in the web root of your server:
echo nl2br("The text sent from AppInventor is: \n\n" . $varName);

  1. Set up your blocks in AppInventor like so:

  1. You should see this in your webviewer:


it gives an error 1109: The specified URL is not valid

I do not get this with my local server on Linux Xubuntu calling the php file from an app.

Probably in your php settings somewhere, or your server requires additional php code - isset

A google returns this

Try this ?

$varName = '';
if (isset($varName)) {
echo nl2br("The text sent from AppInventor is: \n\n" . $varName);