The commands are simple:
So for an SSC I would send this:
But if you would like a delay for reading sonar from a basic stamp you might try something like this:
Where the 75 is a 75ms delay, the 100 is a byte for my basic stamp program below, and the 102 is the command byte telling my basic stamp to return the command.
SERIN 16,16468,main,[WAIT(100), cmd]
I have also included a simple AJAX and PHP script that allows you to access these from a PHP and Apache.