Hello Superia:
Please test all the examples, specially clipshow.php (in Termux):
cd /your/path
php clipshow.php
and copy some text to Android's clipboard; if you have some response with notification and toast, so the Termux:API is correctly installed; else:
* Install Termux:API plug-in from Google Play
* apt install termux-api (in Termux)
cd /your/path
php -S 0.0.0.0:8088 -d /your/path
and open the Web Browser, at the address:
localhost_or_ip:8088/location.php
or
localhost_or_ip:8088/test.php
Because there we haven't an index.php script, we can't browse the root doing localhost:8088/
I can assume that PHP is correctly configured because is very straightforward as can be: apt install php (in Termux)
Please can you send me a more detailed explanation of your problem?
Copy the result of these commands inside Termux (then pressing over the Termux screen for some seconds and selecting the text):
apt search termux-api
apt search php
termux-battery-status
And paste here or in pastebin.com or another place to review.
I wait your response. Thanks!