cURL is a great library for transferring data over a number of network protocols. Unfortunately, it can be a little overwhelming to use for the first time in PHP and there are lots of options available. Here is an easy reference for using cURL in PHP.
In PHP, all command line arguments, including the script name itself are stored in a special array named $argv. The first element, zero, is the name of the script being run. For example:
SSL sockets are perfect for sending secure data. With certificates, you can verify the identify of the host, the client, or both. Signed certificates cost money but you can create and self-sign a certificate. Check out the code samples below to see how to generate SSL certificates and create SSL clients and servers. Examples include raw socket communication as well as the common HTTPS protocol.
With PHP, creating a TCP server takes only a few lines of code. Check out this code that creates a server which responds with the current time.
PHP has a built in web server that was introduced in version 5.4.0. It is not suited for production but is great for easy development or quick testing. Here are a few ways to use it.
Two common libraries for image manipulation with PHP are GD and Imagick. GD typically comes with most PHP setups. Here are some code snippets that demonstrate how to crop an image with both libraries.