Bit of a strange one here, i have a CCTV system and contacted the manufacturers to asked if there was an API. The answer was no.

I've been trying to understand how i can take the live jpeg picture and use it in my own app (c#).

here is a link to the liveview page that displays the the live feeds; http://pastebin.com/jCp4jZRh

The line i'm interested in is;

img_buf[0].src = "ivop.get?action=live&piccnt=0&THREAD_ID=" + thd_id;

Now piccnt seems to be for stopping browsers caching the data, so this number keeps changing and thd_id seems to be the channel number. When trying to access this i get the following message;

Authentication Error:Access Denied, authentication error

Even if i log in first, then try the above url with my own contect i still retrieve the access denied message.

Heres the source to the login page; http://pastebin.com/q7nLJ4tk heres the source to the md5.js file; http://pastebin.com/du1ggaQB

I'm just a little stuck on how to auth then display the feed, does anyone have any pointers?

thanks

Comments

Have you tried specifying a full URL?

Written by Pekka

Also, you could look at the data which is sent with the request to see if there is something you have missed.

Written by Ancide

the full url is; 'mlogin.get?account=admin&passwd=7be6e9f648eeafc6344e52d4034bb8c4&key=rM4oQD1C4J‌​6JLGi1ILf6c3TIfAfUwRjIIPUAqh1D4wZw26XuFserODhntU7ZNoBh&Submit=Login' passwd being the password in md5. not sure what the random key is though

Written by Nathan

Accepted Answer

I answered a similar question awhile back, and the solution ended up being that you had to set the referrer.

In any case, to find your solution, download a copy of Fiddler.

Once running, hit your camera page, and you will see several requests. When you find one of the requests for ivop.get, drag it into the request builder and execute it a second time.

If after executing it a second time it still works (check using the inspectors), then start changing the headers, removing bits one by one until you find the key element. I suspect there will either be a cookie, or referrer that is required.

Once you have figured out those elements, it should be easy to make the appropriate request in your application.

If you can post a live URL, I can help you with this.

Written by Brad
This page was build to provide you fast access to the question and the direct accepted answer.
The content is written by members of the stackoverflow.com community.
It is licensed under cc-wiki