In this course I will be showing you how to create RESTful web services with PHP, no third party frameworks or paid software is needed.
We will be covering the basics of what REST is and how to implement the basics using pure vanilla PHP, at the end of this course you should be able to create a basic RESTful web service that you can allow other people to use.
The course will follow a scenario that we have been given and that is to implement a web service which can record a list of tasks, basically a to–do list. We will be implementing each requirement one at a time and then we will add on the ability for this API to become a multi user service. So each user can securely have their own task list.
To do this we will be implementing an authentication concept called Token based authentication and we will be exploring this further within the course, Token based authentication is a lot more secure than just basic password authentication and is now a best practice among the industry.
We will be starting at the beginning and building as we go, as long as you know the basics of PHP, such as variables, if statements, loops, arrays and some basic object orientated programming concepts you should be able to follow this course to the end. We will also be using MySQL for the database to store the tasks and we will be building and changing the database as we go, and again you don’t need to be an expert on MySQL but just need to know the fundamentals such as basic select, update, delete SQL statements and concepts such as primary keys and foreign keys.
Instructor Details
Courses : 1
Specification: Create a REST API using basic PHP with Token Authentication
|
28 reviews for Create a REST API using basic PHP with Token Authentication
Add a review Cancel reply
This site uses Akismet to reduce spam. Learn how your comment data is processed.
Price | $17.99 |
---|---|
Provider | |
Duration | 17 hours |
Year | 2020 |
Level | All |
Language | English |
Certificate | Yes |
Quizzes | No |
$24.99 $17.99
Sergio Javier Juarez Valenzuela –
Buena eleccion
Robert David –
Great course. Clear and concise. Learned some very useful techniques for future coding.
Helmut Stecher –
Ja, l uft auch auf Linux wunderbar.
Guy Mathieu –
Absolutely amazing!! the course was easy to follow and his response time is very prompt
Massimo Pettin –
Very clear and precise, an excellent introduction to the subject
SAM BD –
Nice and simple for the beginners in general, Though the instructor not following the dry principles . Thanks …
Phetana Mogale –
Awesome
Fan Chieh Lin –
very clear and helpful. Looking forward for future courses
Jeff Barbieri –
I like that this is thorough, professional API/web service example. It doesn’t just show how to do it, but also considers best practices. This is a foundation for building future APIs for me.
Kris Glasier –
The instructor is very verbos and explains things with sufficient detail so beginners to PHP can understand.
David Ainsworth –
Michael is a gifted programmer and has an informative and descriptive way of setting this course out so it is easy to follow and makes sense. I would purchase any future courses that Michael delivered.
Hasan Aswad –
It seems to easy to understand and well explained. Thank You.
Marko Peltom ki –
Great course!
Manuel Celi –
I do recommend this class, I find the class is excellent, Michael is an excellent teacher, I have learned a lot and I fully recommend the class. When you ask Michael a question he gets back to you very quickly, and he goes beyond the call of duty to help you resolve the issue. I understand that Michael has designed this class for beginners and up, and I have to think that is one of the reasons for repetition, but if you are beyond the beginner level my recommendation is that if you take the class, try to modify a few of the things Michael does to make it into a more advanced code, many things can be either added to the classes, or simply write a functions.php file that you can include everywhere else, because some things are not worth writing over and over as I describe below. I do have some recommendations for Michael…the code could be laid out differently to minimize code which would help cut time form the class. A video that takes and hour and twenty minutes can be shrunk to an hour. I believe that time saved can be put into developing an application to connect all the code and sort have a simple user interface. There is a lot of repetition reporting success and errors. I wrote a function to handle that and minimize code. I type what Michael types at all times, but I stop when I find that certain things can be made more efficient, so I have added some functions, and I believe that it paid off, I was able to advance the class to the point where he had finished the error handling code, so I saved a bit of time there. There are 43 occurrences of $response new Response(); followed by 43*5 (there are five more lines after the new Response()) more occurrences of the same stuff. That is 215 more lines of code that could have been reduced to maybe 43. I calculated that it takes an average of one minute and 10 seconds to rewrite the same code, that means that only on the ask.php file you could have saved approximately 43 minutes. Example #1: This is your code: $response new Response(); $response >setHttpStatusCode(500); $response >setSuccess(false); $response >addMessage(Database connection error); $response >send(); exit; This is mine using the function: sendErrorOrSuccess(500, , Database connect error…, false); When I have to pass an array then I do: $myArray array(); $myArray[] First line; $myArray[] Second line; etc. then sendErrorOrSuccess(500, $myArray, A message, false); Parameters are: 1. Error Code (400, 401, etc.) 2. Array passed when more than one message is required. 3. Error Message 4. toCache or not toCache, that is the question. The DB SQL stuff can also be made into functions to avoid repeating. Last thing I will say is that if Michael decides to redo some of the class, by no means start with Authorization, there is no good reason not to do it that way, it can be commented out so that the student doesn’t have to request a token or refresh every time, but knowing what comes then will save time. In my case I had to halt the class to change some of the functions I had written that handle the repetitive code for queries because I had to deal with new authorization code that required changes on my part. All in all it is a very good class and Michael is a very good teacher. Take it, it is worth it. Thank you Michael, thank you very much for your help.
Yuwin Sapumana –
Awesome course learned a lot
Matt Perrine –
Michael is a fabulous teacher! He is clear in his explanations, and very knowledgeable about each topic covered.
DevTeam –
excelete contenido explicacion y todo
David Zhou –
This course is better than what I except, highly recommend but it need some basic PHP knowledge.
Ranjith John –
Simplicity in delivery
Mathankumar K –
Good
Aleksander Moloniewicz NIP 9512201628 –
Great information about CORS!
Martin Leduc –
This training is excellent, nothing else to say.
Pavel –
Reading Slides!. really?
Anthony Catenaci –
Yes
Steven –
One of the best PHP courses on Udemy. Michael actually knows php whereas a lot of other instructors on Udemy often seem to have just learned php and barely have a clue about what they’re doing. Michael on the other hand knows what he’s doing! This course is a bit repetitive, but that’s just the nature of writing an api like this. The plus side of this is that all this repetition helps you retain all the new information better. I truly hope Michael will release another course later on about php or any of its popular frameworks!
Alhassan Kiwamdeen –
Excerllent course
Moath omar obeidat –
very fast support
M. Sher Khan –
This is I think the best course I’ve seen on Udemy. I’m a Uni student and I’ve had many teacher in my life so far from school to Uni and I know very well the difference between the one who is there to really teach something and the one who’s just doing his job or there for the money. I’ve had only one teacher who wasn’t doing it for the money but really wanted to teach us his subject. This teacher would stay hours after school just to answer our questions. Michael is just like that teacher who’s not like other udemy instructors. He knows his stuff and delivers it in a way you can unerstand. What I like the most about this course is that there are two bonus sections and he made bonus sections because he was there to help and listened to all our questions. No course I’ve come across so far on Udemy have such big bonus sections. The last bonus section is like a course of its own. Another thing Michael really anwers every questions and in very detail he even answers questions that has nothing to do with the course at all unlike other instructors on Udemy who just disapper after a few months. I really recommend this course and everybody should take Michael’s courses. Michael, I hope you make more courses like this one we really need poeple like you on Udemy. I’ve a suggestion for a course: Headless CMS in PHP which is also like an API, very related to this course extension of this course.