PHP Tutorials - page 2

A collection of tutorials for learning PHP.

  1. Setting custom HTTP Headers with cURL is useful when changing User Agent or Cookies. Headers can be changed two ways, both using the curl_setopt function.
  2. How to send HTTP requests using the build-in file functions of PHP.
  3. Tutorial on how to use proxy servers with cURL and PHP
  4. How to use cURL to send HTTP GET and POST requests from PHP applications.
  5. There is no build-in way to check if an array is indexed (sequential) or associative in PHP, but you can easily create your own is_associative() function for it.
  6. While there is no function to obtain the full request URL in PHP, we can still make our own using a combination of server variables to get what we need.
  7. Mising PHP with HTML, CSS or JavaScript should be avoided, but there are ways to generate dynamic assets properly. Read this to learn how.
  8. How to use the PHP Foreach loop construct to iterate over arrays.
  9. Learn how to write if statements in PHP in this tutorial. It also includes a video for those who prefer to get things explained.
  10. When using file_get_contents to perform HTTP requests, the server response headers is stored in a reserved variable after each successful request; we can iterate over this when we need to access individual response headers.