Results 1 to 4 of 4
  1. #1
    sri_reddy523 is offline Member
    Join Date
    Mar 2009
    Posts
    9
    Rep Power
    0

    Default Problem With POST command to control the network camera

    POST x//192.168.0.100/ptsf.cgi?Relative=AABBis the command to be send to the web camera to control the relative movement of camera

    When i send the command through the browser its working but when I run my client program its not working,,,,,,,,,,,,,,,,,,,,pls help with my problem

    do I need to send the hole request to the web camera instead of above CGI command
    POST /command/ptzf.cgi HTTP/1.1\r\n
    Host: 192.168.0.102\r\n
    Content-Length:13\r\n
    Cache-Control:no-Cache\r\n
    \r\n
    Relative=0605


    class TCPClient {

    public static void main(String argv[]) throws Exception

    {
    String sentence;
    String modifiedSentence;

    BufferedReader inFromUser =

    new BufferedReader(new InputStreamReader(System.in)); //here cgi commands
    Socket clientSocket = new Socket("192.168.0.100", 80);

    DataOutputStream outToServer =
    new DataOutputStream(clientSocket.getOutputStream());

    BufferedReader inFromServer =
    new BufferedReader(new InputStreamReader(clientSocket.getInputStream()));

    sentence = inFromUser.readLine();

    outToServer.writeBytes(sentence + '\n');

    modifiedSentence = inFromServer.readLine();

    System.out.println("FROM SERVER: " + modifiedSentence);

    clientSocket.close();

    }

    }

  2. #2
    CJSLMAN's Avatar
    CJSLMAN is offline Moderator
    Join Date
    Oct 2008
    Location
    Mexico
    Posts
    1,159
    Rep Power
    8

    Default

    Questions that come to mind:
    • What does the server do with the command?
    • Is the client and server on the same machine?
    • Why is 192.168.0.100 used and then you mention 192.168.0.102 in another example ?


    CJSL
    Chris S.
    Difficult? This is Mission Impossible, not Mission Difficult. Difficult should be easy.

  3. #3
    Steve11235's Avatar
    Steve11235 is offline Senior Member
    Join Date
    Dec 2008
    Posts
    1,046
    Rep Power
    8

    Default

    Dude, you have already received eleven replies to this question on another post. Why are you starting a new thread? This just wastes everyones time, as they repeat the answers already given to you.

    Go back to the previous thread and look at the answers. You should have enough information to find out how to construct a post request.

    In addition, posting a little code that has no bearing on the actual problem simply misleads people into thinking you are putting real effort into this. Use Google, do some research, post some real code that actually does something. As it is, you are taking unfair advantage of the people that are trying to help you.

  4. #4
    tommosimmo is offline Member
    Join Date
    Mar 2009
    Posts
    6
    Rep Power
    0

    Default

    @Steve11235: Your obviously missing the difference between this post and his last post. This post is asking about how to post a CGI request, where his last post was about grabbing an image. Completely different.

Similar Threads

  1. How To Receive And Display Image From Network Camera
    By sri_reddy523 in forum Networking
    Replies: 11
    Last Post: 03-03-2009, 10:22 AM
  2. Replies: 0
    Last Post: 11-20-2008, 12:03 PM
  3. Problem during executing Command Prompt
    By keshari in forum Advanced Java
    Replies: 4
    Last Post: 06-05-2008, 05:06 AM
  4. control app width based on certain control
    By thebillybobjr in forum SWT / JFace
    Replies: 0
    Last Post: 05-15-2008, 05:52 PM
  5. Problem creating a Post script file
    By krishnan.1000 in forum New To Java
    Replies: 0
    Last Post: 02-14-2008, 08:15 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •