How can I solve the problem of whether socket_write in php can directly send hexadecimal data?
Source: Internet
Author: User
In php, can socket_write directly send hexadecimal data? if the hexadecimal data is directly sent, he will first Convert hexadecimal to hexadecimal and then split the string, calculate the split string in hexadecimal notation and send the code as follows: $ str = 0xFA; & nbsp; socket_write ($ connection, $ str ); the data obtained through the packet capture tool is whether socket_write in php 3 can directly send hexadecimal data.
If the hexadecimal data is directly sent, it will first convert the hexadecimal data into a hexadecimal data, then split the string, calculate the hexadecimal string after the split, and finally send the data, the code is as follows:
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.