Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 01-05-2011, 06:54 PM   PM User | #1
imdon
New to the CF scene

 
Join Date: Jan 2011
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
imdon is an unknown quantity at this point
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
imdon is offline   Reply With Quote
Old 01-05-2011, 07:45 PM   PM User | #2
Fou-Lu
God Emperor


 
Fou-Lu's Avatar
 
Join Date: Sep 2002
Location: Saskatoon, Saskatchewan
Posts: 15,653
Thanks: 4
Thanked 2,451 Times in 2,420 Posts
Fou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to all
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.
__________________
As of PHP 5.5, the MySQL library has been officially deprecated. It is recommended to move to either MySQLi or PDO libraries for your mysql connectivity. See here for help choosing which interface you prefer: http://php.net/manual/en/mysqlinfo.api.choosing.php
Fou-Lu is offline   Reply With Quote
Old 01-05-2011, 08:10 PM   PM User | #3
imdon
New to the CF scene

 
Join Date: Jan 2011
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
imdon is an unknown quantity at this point
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.
imdon is offline   Reply With Quote
Old 01-05-2011, 10:47 PM   PM User | #4
Fou-Lu
God Emperor


 
Fou-Lu's Avatar
 
Join Date: Sep 2002
Location: Saskatoon, Saskatchewan
Posts: 15,653
Thanks: 4
Thanked 2,451 Times in 2,420 Posts
Fou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to all
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.
__________________
As of PHP 5.5, the MySQL library has been officially deprecated. It is recommended to move to either MySQLi or PDO libraries for your mysql connectivity. See here for help choosing which interface you prefer: http://php.net/manual/en/mysqlinfo.api.choosing.php
Fou-Lu is offline   Reply With Quote
Old 01-06-2011, 11:27 AM   PM User | #5
imdon
New to the CF scene

 
Join Date: Jan 2011
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
imdon is an unknown quantity at this point
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
imdon is offline   Reply With Quote
Reply

Bookmarks

Tags
c# coding, csharp, web, web and c#

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 05:41 AM.


Advertisement
Log in to turn off these ads.