The command to get the size of send buffer is txbuf.
"get txbuf"
The response value is a string in integer form.
<?php
include "/lib/sd_spc.php";
$rwbuf = "";
$sid = 14;
spc_reset();
spc_sync_baud(115200);
spc_request_dev($sid, "set uart 115200N81");
$txbuf_len = (int)spc_request_dev($sid, "get txbuf");
echo $txbuf_len; // output(e.g.): 12288
?>