This example uses the fsockopen to connect to an url which can be via any port (even the ssl one), posts some data and reads the output page as well as the headers.
Learn create a PHP script to check whether the actual domain name is available or not. In the next section I focus on the .com domains but you can extend the script to handle as many top level domains as you want.
Joining mailing list will entitle you
to receive occasional emails informing you of news and
updates to the site and any special offers that may be
of interest to you.