Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New to the CF scene
    Join Date
    Jan 2011
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Smile Sending data from web server to a specific computer

    Hi all,I am making an application in which I need to send some data from my database in the webserver to a specific computer.
    I mean to say that when a certain event will done,then some data with specific id in the database in webserver,will be sent to a computer where a c# application resides and that application will parse that data.How can I do this?
    I have web skills(html,php/mysql etc) but I am not aware that how to do this.Plz help me
    Thanks

    http://www.developers-web.tk

  • #2
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,978
    Thanks
    4
    Thanked 2,659 Times in 2,628 Posts
    Since you have a listening application on the remote machine, look at using the fsock* family in PHP to create sockets (check this link: http://php.ca/manual/en/ref.network.php). It really depends a lot on what the C# application is doing itself, its possible that alternate protocols can be used like FTP, SSH and so forth too.
    This assumes you have an underlying understanding of this C# application. If not, consult the documentation for the application to see what its listening for, and on what port.
    PHP Code:
    header('HTTP/1.1 420 Enhance Your Calm'); 

  • #3
    New to the CF scene
    Join Date
    Jan 2011
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    More explanations

    Thanks,now I tell you what I am doing
    A c# server,a c# Client,a website.It is a surveillance system.
    Many cameras are attached to the server,a software is on the site(client software).User will signup on the site and download the client application.
    Now the client puts user name etc in the client application and and clicks sign in button and then the data(username,password,ip,id) goes to website's database to check if this exists in database,if it exists then that data will be sent to the server,server will open the cam for that user and user will watch video.You got whole the thing?
    Plz now tell me what to do.

  • #4
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,978
    Thanks
    4
    Thanked 2,659 Times in 2,628 Posts
    I don't know why you'd use PHP at all. Sounds to me like you have an appropriate client / server application up and running where the client can communicate with the server and presumably authenticate with it as well. I wouldn't add the PHP middle man if you don't need it. The server software should be capable of communicating directly with the database to check the authentication required.

    Have you checked the links for the fsockopen in the networking features? That will allow you to create a socket to a remote machine; it doesn't matter if the machine is a server or a client as long as its listening. Once connected, you formulate the appropriate data to send across to the remote machine, which will be fairly custom since it needs to match what the remote machine is capable of understanding.
    PHP Code:
    header('HTTP/1.1 420 Enhance Your Calm'); 

  • #5
    New to the CF scene
    Join Date
    Jan 2011
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Smile It seems good

    hmm.I was also thinking this last night and I have started work in this way.When I will have problem then I will ask you agian.
    Thanks


  •  

    Tags for this Thread

    Posting Permissions

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