GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   How to send Hex 0x1A via PHP (https://gfy.com/showthread.php?t=943477)

mkx 12-15-2009 12:55 AM

How to send Hex 0x1A via PHP
 
I am trying to communicate with a modem connected to my com port via a PHP script. I got everything working except for the last command which is supposed to send 0x1A to the modem. I tried a few variations including:

Code:

ser_write(hexdec("0x1A"));
ser_write("\r\n");

but it just types out 26. It is supposed to represent control-Z and in my terminal program (terminal by Br@y) I trigger it with a macro that says "$1A".

Hope someone can help.

BigBen 12-15-2009 03:59 AM

Try:

ser_write(chr(26));

mkx 12-15-2009 12:11 PM

Quote:

Originally Posted by BigBen (Post 16646970)
Try:

ser_write(chr(26));

If I said I loved you with there a 97% possibility of you being a guy, would that make me gay? :) Thanks so much


All times are GMT -7. The time now is 12:37 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123