I'm kinda new to all this, so tell me if I'm doing something totally wrong.
I'm doing some gpio stuff with my raspberry pi, and at the moment i'm making something so the gpio pins can be controlled via a web interface. One of the ways I'm doing this is using bash CGI scripts to control the pins, and executing them from the browser.
So far the only way I can get this to work involves the browser loading the page ".../cgi-bin/gpio1.cgi
" etc, which contains the code:
#!/bin/bash
echo "Content-type: text/html"
echo ""
...gpio stuff...
This works, but the browser navigates to the blank page created by this script.
Is there a way of executing these scripts without leaving the webpage, and so the scripts aren't writing HTML but instead focusing on the actual gpio stuff?
Thanks