Hi
Ja, das PHP-Teil hab ich gesehen, hat aber so auf Anhieb nicht funkioniert (keine Ahnung von PHP
)
Dafür hab ich mal ne rudimentäre web-gui als Shellscript gebastelt. Alles sehr quick an dirty... manchmal muss ich einen Refresh machen um das Bild zu laden, kann aber am Zwangsproxy liegen.
Also hier und ohne Gewehr:
#!/bin/sh
### CONFIG ###
#username and password for accessing the webinterface
UNAME=xxx
UPWD=xxx
ROBOIP=192.168.xx.x
WGET=wget
BEEP=beep
SLEEP=sleep
CAT=cat
RM=rm
########
CMD_P1=5
CMD_P2=$3
CMD_P3=$4
CMD_P4=$5
#declare -i CMD_V1=-1
CMD_V1=-1
echo "Content-type: text/html"
echo ""
# our html header
echo "<html>"
echo "<head><title>cam.sh</title><META HTTP-EQUIV=\"CACHE-CONTROL\" CONTENT=\"NO-CACHE\"></head>"
echo "<body>"
# read in our parameters
CMD=`echo "$QUERY_STRING" | sed -n 's/^.*cmd=\([^&]*\).*$/\1/p' | sed "s/%20/ /g"`
# pan/tilt movements
if [ $CMD = "u" ] ; then CMD_V1=1;
else if [ $CMD = "d" ] ; then CMD_V1=7;
else if [ $CMD = "l" ] ; then CMD_V1=3;
else if [ $CMD = "r" ] ; then CMD_V1=5;
else if [ $CMD = "reload" ] ; then CMD_V1=-1;
fi
fi
fi
fi
fi
# perform pan/tilt movement
$WGET -q -O - --post-data "PanSingleMoveDegree=${CMD_P1}&TiltSingleMoveDegree=${CMD_P1}&PanTiltSingleMove=${CMD_V1}" http://${UNAME$
# print out the form
echo "Choose which command you want to run"
echo "<form method=get>"
echo "<input type=radio name=cmd value=l> nach links bewegen <br>"
echo "<input type=radio name=cmd value=r> nach rechts bewegen <br>"
echo "<input type=radio name=cmd value=u> nach oben bewegeb <br>"
echo "<input type=radio name=cmd value=d> nach unten bewegen <br>"
echo "<input type=submit>"
echo "</form>"
$SLEEP 3
echo "<hr>"
$RM IMAGE.JPG
$WGET --output-document=IMAGE.JPG http://$UNAME:$UPWD@$ROBOIP/IMAGE.JPG
$SLEEP 1
echo "<img src=\"IMAGE.JPG\">"
echo "</body>"
echo "<HEAD>"
echo "<META HTTP-EQUIV=\"Pragma\" CONTENT=\"no-cache\">"
echo "</HEAD>"
echo "</html>"