Go4Expert

Go4Expert (http://www.go4expert.com/)
-   C++ (http://www.go4expert.com/forums/cpp/)
-   -   SOCKET connect C/C++ to PHP (http://www.go4expert.com/forums/socket-connect-c-cpp-php-t29058/)

gilit2 6Sep2012 16:52

SOCKET connect C/C++ to PHP
 
Hi
I need to send messages from php to C/C++
Can anyone show me the code of
server in C , windows
and
client in PHP
using socket
I have managed to do socket from php to php
(both server and client in php)
I need only the simple option for one connection
So I need only the most basic

shabbir 6Sep2012 19:34

Re: SOCKET connect C/C++ to PHP
 
Having same thread in different forums does not help and so deleted your other thread.

Becks 7Apr2013 16:47

Re: SOCKET connect C/C++ to PHP
 
I would be interested in the some tipps about sockets etc.

Syperus 7Apr2013 18:30

Re: SOCKET connect C/C++ to PHP
 
@Becks, If you want to do some C++ programming with sockets you will need to learn TCP/UDP socket protocols and how to handle them. You'll first need to decide whether these sockets will be TCP or UDP sockets ie Do you need to establish a connection with the server, or do you need to ensure the information is received in the order it was sent, or do you need error handling? If any of these then you will need a TCP socket, otherwise you can use UDP. With UDP information is sent to the destination without establishing a connection to the server, no error handling, and since there is no error handling there is guarantee the information you sent was received by the server or that all your information was received in the correct order. UDP is useful for sending updates to a server ie A control panel. Just remember those 3 options about TCP. If any of those, then you need to use a TCP socket (which does require more properties) otherwise you might be able to get by with a UDP. Learning TCP/IP networking can help a lot in this category. You will understand how sockets work better, and what needs to happen for them to be handled properly.


All times are GMT +5.5. The time now is 15:39.