PhpRiot
News Archive
PhpRiot Newsletter
Your Email Address:

More information

Kevin Schroeder's Blog: You want to do WHAT with PHP? Chapter 1

Note: This article was originally published at PHPDeveloper on 27 August 2010.
PHPDeveloper

Kevin Schroeder has a new post today with an excerpt from his book "You Want to do WHAT with PHP?" - the first chapter looking at networking and socket connections.

I'm also woefully behind on blogging. So, to alleviate that I am going to post an excerpt from my upcoming book "You want to do WHAT with PHP?" Today we are going to take a look at Chapter 1.

The sample chapter talks about figuring out the host to netmask relationship relationship by parsing the IP with the ip2long and comparing that to the list of netmasks from an array. Sample code is provided as well as output for reference.