Yesterday, I was explaining basic built-in streams. Today I’ll be covering the advanced modes. The first thing is basic network access (http, ftp, etc). Normally, you would just use fopen() or file_get_contents(). Well what would happen if you wanted to provide additional parameters to that call, like user agent? Meet stream_context_create():
Now that we’ve talked about files, it’s time to talk about directory access. PHP has a whole variety of functions designed just for this! Here are the important ones:
Yesterday, I kind-of neglected to show you an example of how perform basic file access. Today I will remedy that! File access can be done various ways and each has its own reasons. Here is an example of a CSV read:
I only have one week before my certification exam! I’m shivering in my boots (if I had boots)! Well, the important part is not to worry and keep studying. Here is today’s topic (and the last chapter of the book):
The streams layer is a series of classes/methods in PHP that manage the reading and writing to various data sources (file, network, compression, etc.). Here are the basic commands you need to know regarding any stream:
Okay, today should be the last day of Security topics (finally). The first one we’re going to cover is: