The REST API Walkthrough that you have referenced is not
related to DocuSign Connect at all. In the DocuSign platform there are two
ways to get information about your envelopes - you can pull envelope data
every so often, or you can have the envelope data pushed to you as they are
completed, declined, etc. The walkthrough that you've referenced is the
first method (i.e. it shows how to pull envelope data when you want).
DocuSign Connect works in the reverse in that, based on how you configure
it, it sends you data as events happen.
For starters, to configure Connect settings login to your account at
demo.docusign.net, click your profile icon in the top right, and go to
Preferences -> Connect
On that page you will be able to select on of your Connect
configurations (or create one if needed) and then configure for which users
you want data pushed, on what events, and other settings.
In terms of setting up your listener, you can use any language that can
successfully listen for http events (so your choice of PHP should be fine)
but there's just a couple of things you'll need to ensure. For starters,
you need to make sure you are listening or the proper port. In the DEMO
system you can test on http (port 80) or https (port 443), but please note
that in production (www.docusign.net) only https is allowed. Also note
that you will not be able to test using a localhost URL. You need a real
URL that can be reached from the outside world.
Your best bet for info and getting started is the page from the DocuSign
Dev Center which describes Connect and links to it's guide. Please see
here for more info: