Answer the question
In order to leave comments, you need to log in
Get image from ip camera in real time using php or js?
Hello.
Guys, is there such an opportunity to get an image in real time from an ip camera? That is, what would the script even run on the crown and get the image? Just save it and that's it.
Answer the question
In order to leave comments, you need to log in
Kirill Gorelov regularly pick up a jeepag what's going on there nowphoto
I hope you can save the crown ....
$link="http://rtsp.me/ff.php?camId=j60tUEa7";
$ch = curl_init();
curl_setopt($ch, CURLOPT_POST, 0);
curl_setopt($ch,CURLOPT_URL,$link);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$cu_result=curl_exec($ch);
curl_close($ch);
$savefile = fopen('/home/user/image.jpg', 'w');
fwrite($savefile, $cu_result);
fclose($savefile);
At one time I made a php wrapper for streaming on a site from a Chinese ip-camera with RTMP authorization.
Unfortunately, a piece of code that implements this task has been lost in time.
Used curl and RFC documentation on RTMP protocol.
In my opinion, it will be better and relatively easier to implement using the nginx module https://habrahabr.ru/post/236359/ , then on the client side it will be enough to make a request to get the picture via AJAX, and it will be easier to use it for streaming.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question