php-ffi
php-ffi copied to clipboard
Can PHP stream be passed as argument?
Hello,
Please help me, can i with this library write something like this:
status = getsockopt(acceptedSocket, SOL_IP, SO_ORIGINAL_DST, (struct sockaddr *) &destaddr, &destlen);
? - I want get SO_ORIGINAL_DST socket property accepted with PHP via stream_socket_accept.
It would be great functionaly for creating transparent proxies with PHP.
Thanks in advance.
No. php stream is not going to be automatically converted to integer file descriptor, and it seems, PHP doesn't expose any function to get file descriptor from a stream.