Jump to content

send message to a server port


snk

Recommended Posts

Hello, I would like to find out how i can send, with php, a string message to a remote server:port

 

I want to make my server to respond via messages from a php page. Sever is made in .NET, is listening for incoming connections, analyzes the data, strings in my case, and responds accordingly.

 

I would appreciate if you could redirect me to some useful links.

 

Thank you in advance

 

 

Link to comment
https://forums.phpfreaks.com/topic/77966-send-message-to-a-server-port/
Share on other sites

hello again,

 

thanks for the quick response, i was checking for the sockets that ive been advised but its not what i want to do.

 

Particularly i want 2 things, to accept some data from a web form and

 

1. add them in mysql.

2. send those data to remote machine in a specific port

 

i have stacked with the 2nd part.

 

Thanks for your time

For an example of what you need to do go the the link I posted above. See the example called "Example 2285. Socket example: Simple TCP/IP client" on that page. This is sort of what you need to do. The request you send should obviously be changed to whatever your server (the one written with some sort of .NET technology) accepts.

yes right..! Thanks a lot Daniel.

 

for the rest of people who look for something similar, we need a thread in order to be compliant with the tcp protocol, script has to keep the connection to reassure that messages have arrived to the destination.

 

I am not sure if we are in need of threads when we send msg via UTP packet. It would be great if somebody could answer.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.