APIs in PHP: from Basic to Advanced
APIs in PHP: from Basic to Advanced, available at $74.99, has an average rating of 4.79, with 90 lectures, 3 quizzes, based on 1085 reviews, and has 6188 subscribers.
You will learn about Understand how APIs work Learn how to use an API from PHP Create an API from scratch in plain PHP Create, Read, Update, Delete (CRUD) using an API Understand what REST and RESTful APIs are Create a RESTful API in PHP Understand how different API authentication mechanisms work Create API-key authentication for your API Understand how JSON web tokens (JWTs) work, the advantages and disadvantages, and why we use them Understand how HTTP requests and responses work This course is ideal for individuals who are PHP developers of all levels who want to learn how to use third-party APIs in their code or PHP developers of all levels who want to create their own APIs or Experienced PHP API developers who want to add authentication to their APIs It is particularly useful for PHP developers of all levels who want to learn how to use third-party APIs in their code or PHP developers of all levels who want to create their own APIs or Experienced PHP API developers who want to add authentication to their APIs.
Enroll now: APIs in PHP: from Basic to Advanced
Summary
Title: APIs in PHP: from Basic to Advanced
Price: $74.99
Average Rating: 4.79
Number of Lectures: 90
Number of Quizzes: 3
Number of Published Lectures: 90
Number of Published Quizzes: 2
Number of Curriculum Items: 93
Number of Published Curriculum Objects: 92
Original Price: $124.99
Quality Status: approved
Status: Live
What You Will Learn
- Understand how APIs work
- Learn how to use an API from PHP
- Create an API from scratch in plain PHP
- Create, Read, Update, Delete (CRUD) using an API
- Understand what REST and RESTful APIs are
- Create a RESTful API in PHP
- Understand how different API authentication mechanisms work
- Create API-key authentication for your API
- Understand how JSON web tokens (JWTs) work, the advantages and disadvantages, and why we use them
- Understand how HTTP requests and responses work
Who Should Attend
- PHP developers of all levels who want to learn how to use third-party APIs in their code
- PHP developers of all levels who want to create their own APIs
- Experienced PHP API developers who want to add authentication to their APIs
Target Audiences
- PHP developers of all levels who want to learn how to use third-party APIs in their code
- PHP developers of all levels who want to create their own APIs
- Experienced PHP API developers who want to add authentication to their APIs
An API is a way for a program to interact with another program. By using third-party APIs from your code, you can utilise functionality developed elsewhere. By creating an API to access your own data, other programs can take advantage of your services in a secure and easy fashion.
Learn how to Use and Create Secure and Scalable APIs in PHP in this Comprehensive Course.
-
Understand how APIs work
-
Learn how to use an API from PHP
-
Understand how HTTP requests and responses work
-
Understand what REST and RESTful APIs are
-
Create a RESTful API from scratch, using plain PHP and MySQL
-
Understand how API authentication works
-
Add API key authentication to your API
-
Understand how JSON Web Tokens (JWTs) work
-
Add JWT access token authentication to your API
The essential skills required to use and develop APIs with PHP.
Unless you create every component of your application from scratch, your code will need to interact with external services – for example a payment gateway, or currency data. To use such services, you need to consume their APIs. On this course you’ll learn how to do this from PHP, and also how to create an API so that external programs can interact with your application.
Content and Overview
This course is designed for the PHP developer who wants to learn in depth how to use APIs from their code. I designed the course to be easily understood by PHP developers who have no previous experience of using APIs, and who want to develop full, secure APIs quickly and easily. Learning the techniques on this course will enable you to create APIs that are secure, robust and that comply with industry standards.
-
Suitable for all PHP developers, you’ll start by learning the basics of how APIs work.
-
You’ll learn various techniques for consuming APIs from PHP, along with their advantages and disadvantages.
-
We’ll build a full API from scratch, with each concept explained in detail at every stage.
-
You’ll learn what REST and what RESTful APIs are, why we use them, and how to make your API RESTful.
-
Throughout the course, we’ll build code that you can reuse in all your projects.
-
All the source code developed in the lectures is available to download.
-
All the time we’ll adhere to industry standards and best practices.
-
Each section has short, self-contained lectures that you can go back to reinforce specific concepts if you need to.
When you complete the course you’ll be able to use APIs in your PHP applications to leverage third-party components and services. You’ll also be able to create your own API, using various authentication techniques depending on the type of API you want to create.
Complete with all the code shown in the lectures, you’ll be able to work alongside the instructor and will receive a verifiable certificate of completion upon finishing the course.
Also, at all times throughout the course you have access to the instructor in the Q&A section to ask for help with any topic related to the course.
Enrol now and become a master of APIs in PHP!
Course Curriculum
Chapter 1: Introduction: how to use the course and software installation
Lecture 1: Introduction and welcome: how to get the most out of the course
Lecture 2: Install a package with a web server, PHP, a database server and phpMyAdmin
Lecture 3: Install Composer: manage third-party packages and autoload class files
Chapter 2: API basics: what APIs are and how to use them
Lecture 1: What is an API?
Lecture 2: Make an API call: access an API from PHP
Lecture 3: Decode API results: reading JSON in PHP
Lecture 4: Use API data in a web application
Chapter 3: HTTP basics: requests, responses and using cURL
Lecture 1: Use cURL instead of file_get_contents to make an API request
Lecture 2: Response codes: get the HTTP status code
Lecture 3: Request headers: add meta data about the request
Lecture 4: Response headers: read meta data about the response
Lecture 5: Get all individual response headers in an array
Lecture 6: Use an API that requires a specific request header
Lecture 7: Request method: change the method to get a different result with the same URL
Lecture 8: Request body: add a payload to send data along with the request
Chapter 4: REST and RESTful APIs: using them from PHP
Lecture 1: REST and RESTful APIs: what are they?
Lecture 2: Access a RESTful API in PHP with cURL
Lecture 3: Use the Guzzle HTTP client for object-oriented API code
Lecture 4: Use an SDK: compare the Stripe API to its SDK
Chapter 5: Create a RESTful API: build a framework for serving the API
Lecture 1: Start writing the API: enable URL rewriting
Lecture 2: The front controller: get the resource, ID and the request method
Lecture 3: Use a client for API development: cURL, Postman or HTTPie
Lecture 4: Set the HTTP status code: best practices
Lecture 5: Add a controller class to decide the response
Lecture 6: Use Composer's autoloader to load classes automatically
Lecture 7: Make debugging easier: add type declarations and enable strict type checking
Lecture 8: Always return JSON: add a generic exception handler and JSON Content-Type header
Lecture 9: Send a 405 status code and Allow header for invalid request methods
Chapter 6: Create a RESTful API: create a database and retrieve data from it
Lecture 1: Create a new database and a database user to access it
Lecture 2: Create a table to store resource data
Lecture 3: Connect to the database from PHP: add a Database class
Lecture 4: Move the database connection data to a separate .env file
Lecture 5: Create a table data gateway class for the resource table
Lecture 6: Show a list of all records
Lecture 7: Configure PDO to prevent numeric values from being converted to strings
Lecture 8: Convert database booleans to boolean literals in the JSON
Lecture 9: Show an individual record
Lecture 10: Respond with 404 if the resource with the specified ID is not found
Chapter 7: Create a RESTful API: create, update and delete individual resources
Lecture 1: Get the data from the request as JSON
Lecture 2: Insert a record into the database and respond with a 201 status code
Lecture 3: Add a generic error handler to output warnings as JSON
Lecture 4: Validate the data and respond with a 422 status code if invalid
Lecture 5: Conditionally validate the data when updating an existing record
Lecture 6: Get the data from the request for updating an existing record
Lecture 7: Update the record in the database and return a 200 status code
Lecture 8: Delete the record in the database and return a 200 status code
Chapter 8: API key authentication
Lecture 1: Create a table to store user account data
Lecture 2: Add a register page to insert a new user record and generate a new API key
Lecture 3: Send the API key with the request: query string or request header
Lecture 4: Check the API key is present in the request and return 400 if not
Lecture 5: Create a table data gateway class for the user table
Lecture 6: Authenticate the API key and return a 401 status code if invalid
Lecture 7: Refactor the front controller to a bootstrap file and Auth class
Lecture 8: Add a foreign key relationship to link task records to user records
Lecture 9: Retrieve the ID of the authenticated user when authenticating
Lecture 10: Restrict the tasks index endpoint to only show the authenticated user's tasks
Lecture 11: Restrict the rest of the task endpoints to the authenticated user's tasks
Lecture 12: Cache the database connection to avoid multiple connections in the same request
Chapter 9: An introduction to authentication using access tokens
Lecture 1: An introduction to authentication using access tokens
Lecture 2: Create the login script and return 400 if the username and password are missing
Lecture 3: Select the user record based on the username in the request
Lecture 4: Check the username and password and return a 401 status code if invalid
Lecture 5: Generate an encoded access token containing the user details
Lecture 6: Pass the access token to the task API endpoints in the authorization header
Lecture 7: Validate the access token and decode its contents
Lecture 8: Get the authenticated user data from the access token
Chapter 10: Authentication using JSON Web Tokens (JWTs)
Lecture 1: An introduction to JSON web tokens (JWTs)
Lecture 2: Create a class to encode a payload in a JWT
Lecture 3: Generate a JWT access token in the login endpoint containing JWT claims
Lecture 4: Add a method to decode the payload from the JWT
Lecture 5: Pass in the secret key used for hashing as a dependency
Lecture 6: Authenticate the task endpoints using the JWT
Lecture 7: Use a custom exception class to return 401 if the signature is invalid
Lecture 8: Don't store sensitive data in the JWT
Chapter 11: Expiring and refreshing access tokens
Lecture 1: Why access tokens need to expire and how to refresh them in a user-friendly way
Lecture 2: Add an expiry claim to the access token payload when logging in
Lecture 3: Throw a custom exception to not accept the JWT if it has expired
Lecture 4: Issue a refresh token in addition to the access token when logging in
Lecture 5: Add a refresh endpoint and validate the refresh token in the request
Lecture 6: Validate the user in the refresh token using the database
Lecture 7: Issue a new access token and refresh token to the authenticated user
Lecture 8: Create a table to store a refresh token whitelist
Lecture 9: Store the refresh token in the whitelist when issued in the login endpoint
Lecture 10: Replace the refresh token in the whitelist when issued in the refresh endpoint
Lecture 11: Validate the refresh token is on the whitelist and return a 400 response if not
Lecture 12: Add a logout endpoint to remove the an active refresh token from the whitelist
Lecture 13: Add a script to clear out expired refresh tokens from the whitelist
Instructors
-
Dave Hollingworth
IT Trainer
Rating Distribution
- 1 stars: 2 votes
- 2 stars: 7 votes
- 3 stars: 69 votes
- 4 stars: 286 votes
- 5 stars: 721 votes
Frequently Asked Questions
How long do I have access to the course materials?
You can view and review the lecture materials indefinitely, like an on-demand channel.
Can I take my courses with me wherever I go?
Definitely! If you have an internet connection, courses on Udemy are available on any device at any time. If you don’t have an internet connection, some instructors also let their students download course lectures. That’s up to the instructor though, so make sure you get on their good side!
You may also like
- Top 10 Language Learning Courses to Learn in November 2024
- Top 10 Video Editing Courses to Learn in November 2024
- Top 10 Music Production Courses to Learn in November 2024
- Top 10 Animation Courses to Learn in November 2024
- Top 10 Digital Illustration Courses to Learn in November 2024
- Top 10 Renewable Energy Courses to Learn in November 2024
- Top 10 Sustainable Living Courses to Learn in November 2024
- Top 10 Ethical AI Courses to Learn in November 2024
- Top 10 Cybersecurity Fundamentals Courses to Learn in November 2024
- Top 10 Smart Home Technology Courses to Learn in November 2024
- Top 10 Holistic Health Courses to Learn in November 2024
- Top 10 Nutrition And Diet Planning Courses to Learn in November 2024
- Top 10 Yoga Instruction Courses to Learn in November 2024
- Top 10 Stress Management Courses to Learn in November 2024
- Top 10 Mindfulness Meditation Courses to Learn in November 2024
- Top 10 Life Coaching Courses to Learn in November 2024
- Top 10 Career Development Courses to Learn in November 2024
- Top 10 Relationship Building Courses to Learn in November 2024
- Top 10 Parenting Skills Courses to Learn in November 2024
- Top 10 Home Improvement Courses to Learn in November 2024