PHP Tutorials

A collection of tutorials for learning PHP.

  1. How to use cURL to send HTTP GET and POST requests from PHP applications.
  2. Tutorial on how to use proxy servers with cURL and PHP
  3. We can access other classes properties (variables) and methods (functions) by injecting the class object in the class that needs it.
  4. This tutorial explains how to create a PHP script to show a random image in a browser.
  5. This tutorial explains how arrays may be created in PHP, and what they can be used for.
  6. Tutorial on how to use the while and for loops of PHP.
  7. Learn how to write if statements in PHP in this tutorial. It also includes a video for those who prefer to get things explained.
  8. How to send HTTP requests using the build-in file functions of PHP.
  9. How to make PHP sleep for milliseconds rather than seconds.
  10. 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.
  11. How to do disk operations, such as creating and deleting files, in PHP.
  12. In this tutorial I show how to create a simple_delete() function in PHP to automatically delete whatever you ask it, and also handle errors.
  13. I needed a script to quickly rename all files in a directory, so I came up with this elegant PHP solution.
  14. How to properly validate input from PHP using preg_match, and avoid undefined notices.
  15. This shows how to do a grep-like action using regular expressions from a PHP script.
  16. PHP Switch Statement Tutorial. Learn how to work with Switch statements in PHP, and about using Switch vs If Statements.
  17. Tutorial showing how to use Sessions in PHP.
  18. Tutorial on how to use PHPs include, include_once and require.
  19. How to track keywords and keyphrases with PHP's preg_match_all.
  20. Beginners Tutorial in Object-oriented programming in PHP.