Dear All, How to make a php socket client that needs to perform socket_sendto to linux C socket server which has following struct
typedef struct
{
UI2 todo;
char rz[LNG_RZ + 1];
char saId[LNG_SAT_ID + 1];
char user[LNG_USER + 1];
char lang[LANGLEN + 1];
SI4 result;
UI4 socket;
char text[LNG_ALLG + 1];
char filename[MAX_PATHLEN];
} dmsAuf_Head;
Obviously, PHP is known not to support struct how can I pass the c data to socket using php
I know there is a trick to make c struct object using the method below:
class dmsAuf_Head {
public todo;
public rz
public saId
public user
public lang
public result;
public socket;
public text
public filename
}
$obj = new dmsAuf_Head();
but this would not take care of the size of the attribute? Any recommnedation?