Click here to Skip to main content
15,887,746 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hello
i want to send a command to my camera next it give to me a response
i want to read a response in xml file
is possibile?

What I have tried:

C#
<pre>   WebRequest request = WebRequest.Create(
              "http://192.168.1.15:88/cgi-bin/CGIProxy.fcgi?cmd=getMotionDetectConfig&usr=MyHome&pwd=Benstart1983");
            // If required by the server, set the credentials.  
            request.Credentials = CredentialCache.DefaultCredentials;
            // Get the response.  
            WebResponse response = request.GetResponse();
            // Display the status.  
        //    listBox1.Items.Add(((HttpWebResponse)response).StatusDescription);
            // Get the stream containing content returned by the server.  
            Stream dataStream = response.GetResponseStream();
            // Open the stream using a StreamReader for easy access.  
            StreamReader reader = new StreamReader(dataStream);
            // Read the content.  
            string responseFromServer = reader.ReadToEnd();
            // Display the content.  
            listBox1.Items.Add((responseFromServer));
            // Clean up the streams and the response.  
            reader.Close();
            response.Close();
Posted
Comments
[no name] 15-Sep-18 16:48pm    
Does the camera "respond" in XML?

Can I make a chicken lay chocolate eggs?
Mikixx 15-Sep-18 16:49pm    
i see in browser like xml

<cgi_result>
<result>0

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900