URL command doesn't work
Question
I have tried to write a simple php script for exit the motion:
Why does it not work? I have set up only one camera.
html output
Warning: file_get_contents(http://localhost:8080/0/action/quit) [function.file-get-contents]: failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in /var/www/get.php on line 4
motion.conf
############################################################
# Live Webcam Server
############################################################
# The mini-http server listens to this port for requests (default: 0 = disabled)
webcam_port 8081
# Quality of the jpeg images produced (default: 50)
webcam_quality 50
# Output frames at 1 fps when no motion is detected and increase to the
# rate given by webcam_maxrate when motion is detected (default: off)
webcam_motion off
# Maximum framerate for webcam streams (default: 1)
webcam_maxrate 10
# Restrict webcam connections to localhost only (default: on)
webcam_localhost off
# Limits the number of images per connection (default: 0 = unlimited)
# Number can be defined by multiplying actual webcam rate by desired number of seconds
# Actual webcam rate is the smallest of the numbers framerate and webcam_maxrate
webcam_limit 0
############################################################
# HTTP Based Control
############################################################
# TCP/IP port for the http server to listen on (default: 0 = disabled)
control_port 8080
# Restrict control connections to localhost only (default: on)
control_localhost off
# Output for http server, select off to choose raw text plain (default: on)
control_html_output on
# Authentication for the http based control. Syntax username:password
# Default: not defined (Disabled)
control_authentication usr:usrpw
Environment
Motion version: |
3.2.9 |
ffmpeg version: |
|
Libraries: |
ffmpeg, mysql, postgresql |
Server OS: |
|
--
VictorHung - 11 Mar 2008
Answer
There's no problem in motion , your problem is in your PHP setup :
http://www.php.net/manual/es/ref.filesystem.php#ini.allow-url-fopen
--
AngelCarpintero - 16 Mar 2008