K
K
Kirill Gorelov2016-09-25 14:54:51
PHP
Kirill Gorelov, 2016-09-25 14:54:51

How to get an image from a live camera in php or js?

Guys, hello everyone.
A question. There is a site that shows online cameras of the city.
I need to get an image, how can this be done. When I take a screenshot of the page with this video, it does not display anything.
Is it possible to do this at all and how?

Answer the question

In order to leave comments, you need to log in

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

Kirill Gorelov regularly pick up the jepag what's going on therephoto

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

D
dev400, 2016-09-25
@dev400

you must first fully load the page and then take a screenshot, because the player loads for half a second

A
Alexander Shapoval, 2016-09-26
@AlexanderShapoval

Is there a video stream or consecutive photos (from the phone, I can’t look)? If the photos - you can get a link, and download a crown once a minute.
There was a similar case with webcams from the NASA hangar, there were cameras that updated the image every minute. Personally, I came up with this option

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question