K
K
Kirill Gorelov2016-09-26 21:57:29
PHP
Kirill Gorelov, 2016-09-26 21:57:29

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

2 answer(s)
D
Daemon23RUS, 2016-09-28
@Kirill-Gorelov

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);

T
theg4sh, 2016-09-27
@theg4sh

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 question

Ask a Question

731 491 924 answers to any question