The command to get the size of receive buffer is rxbuf.
"get rxbuf"
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");
$rxbuf_len = (int)spc_request_dev($sid, "get rxbuf");
echo $rxbuf_len; // output(e.g.): 12288
?>