Note that there are some explanatory texts on larger screens.

plurals
  1. POAccess remote DVR protected by password in php
    primarykey
    data
    text
    <p>I have a dvr. Some cameras are attached to it. The dvr can be accessed by a web browser from Internet. The dvr is protected by username and password. How can I connect to the webserver without typing everytime login and password? There is a way to do it in php? I used this script</p> <pre><code>&lt;? $username = "xxxx"; $password = "aaaa"; $base_url = "http://myip/cgi-bin/slogin/login.py"; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $base_url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_USERPWD, "$username:$password"); curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC); $output = curl_exec($ch); $info = curl_getinfo($ch); print_r($info); curl_close($ch); ?&gt; </code></pre> <p>When I connect, I get the details of print_r, but nothing else:</p> <pre><code>Array ( [url] =&gt; http://xx.xx.xxx.xx/cgi-bin/slogin/login.py [content_type] =&gt; text/html; charset=iso-8859-1 [http_code] =&gt; 200 [header_size] =&gt; 225 [request_size] =&gt; 121 [filetime] =&gt; -1 [ssl_verify_result] =&gt; 0 [redirect_count] =&gt; 0 [total_time] =&gt; 0.823264 [namelookup_time] =&gt; 0.00104 [connect_time] =&gt; 0.120289 [pretransfer_time] =&gt; 0.120435 [size_upload] =&gt; 0 [size_download] =&gt; 1515 [speed_download] =&gt; 1840 [speed_upload] =&gt; 0 [download_content_length] =&gt; -1 [upload_content_length] =&gt; -1 [starttransfer_time] =&gt; 0.690632 [redirect_time] =&gt; 0 [certinfo] =&gt; Array ( ) ) </code></pre> <p>I saw that there is a 200OK, so I guess the connection was fine. But how to go on? I to enter the web site of the weserver?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload