HTTP Headers In PHP - Request & Response Headers - Full PHP 8 Tutorial

Поделиться
HTML-код
  • Опубликовано: 28 авг 2024
  • In this lesson, you will learn the basics of HTTP headers, HTTP messages, HTTP response status codes, the structure of request & response, and more. We'll send a 404 status header when a non-existing page is visited, you'll learn how to redirect users & send appropriate headers to download a file.
    SOME OF THE WAYS YOU CAN SUPPORT THE CHANNEL
    👍 Smash the like button
    🤝 Subscribe to the channel & turn the notifications on
    💬 Post comments, any feedback is greatly appreciated
    ⭐ Become a Patreon: / programwithgio
    THANK YOU!
    LESSON 2.28
    Course Outline - github.com/gge...
    Course Playlist - • Learn PHP The Right Wa...
    RESOURCES
    Video About Sessions & Cookies - • PHP Sessions & Cookies...
    www.php.net/ma...
    developer.mozi...
    developer.mozi...

Комментарии • 53

  • @robeeeeen
    @robeeeeen Месяц назад +3

    In 2024, still this is the best Free Advanced Php Course !!

  • @ugliBoro
    @ugliBoro 3 года назад +6

    I'm learning php after a very long time and this channel is on point... Rather than the old php courses and videos on yt. Thank you, sir, you made php more approachable for me. Last time I gave up on php around a year ago due to lack of interest and the oddity of php since there weren't many contents and the available ones were either old or hard for me to understand(cause_individuality!). Currently have watched 15 videos on incognito but gonna continue on my official login. Once again, thanks for your hard effort to make an old language like PHP rebirth. Hope more and more people use your sources as a reference like I'm doing now.

    • @ProgramWithGio
      @ProgramWithGio  3 года назад

      Thank you so much. I'm really happy to hear that 🙏

  • @araujored1146
    @araujored1146 5 месяцев назад

    I'm just now watching all the videos and implementig every good practice to my first app, these videos have been so helpful for me! Thank you, sir! Everyday I come here to learn something from a source that is trustable.

  • @Zubbee
    @Zubbee 2 года назад +1

    Great lesson. In a small procedural personal php project I created, I used location headers to redirect after saving. Just saw that it was used but I didn't know anything else about it. But this lesson has covered it with explanations and covered many other areas too. These lessons are a gift Gio. Thanks alot. Also, I really like learning how things work. I'm now looking forward to seeing how frameworks help to make things faster. Thanks again

  • @user-zh2oz9fe4m
    @user-zh2oz9fe4m Год назад

    This PHP course is astonishing! Thanks a bunch!

  • @DanThemes
    @DanThemes 2 года назад +2

    It would be awesome if in the future you'd teach a Laravel course (complete beginner to advanced). Given your knowledge and teaching skills, I'm sure many would pay to watch it.

    • @ProgramWithGio
      @ProgramWithGio  2 года назад

      I might :). Thank you for the suggestion

    • @ovidiublaga1
      @ovidiublaga1 Год назад

      I would pay to watch a symfony course from you

  • @cassidy318
    @cassidy318 Год назад +1

    This was very valuable for my debugging thank you!

  • @Armando-px8hi
    @Armando-px8hi Год назад

    It was very interesting to know about http request response numbers, by the time all of us always get 404 not found but no one knew why?😂 In Laravel I have used header but did not know where it comes from or how to correctly use it. Thank you Gio, can not wait to start the3section and the project.

  • @federicobau8651
    @federicobau8651 2 года назад +2

    Fantastic video, thanks

  • @emekatimothyiloba699
    @emekatimothyiloba699 Год назад

    Gio you are really good

  • @temotemo-lw2du
    @temotemo-lw2du Год назад

    sagol dzmao am kursma damawyebina samsaxuri

    • @ProgramWithGio
      @ProgramWithGio  Год назад

      მაგარია, გაიხარე და წარმატებები

  • @gosnooky
    @gosnooky 3 года назад +4

    Sounds like you said headers are case-sensitive, but they are indeed case-INsensitive.

    • @ProgramWithGio
      @ProgramWithGio  3 года назад +4

      That's right, I meant case-insensitive, not sure why it came out as case-sensitive. I cut it out so it doesn't confuse anyone. Thanks for catching it.

  • @php3418
    @php3418 3 года назад

    Very informative

  • @szybkiinwalida8212
    @szybkiinwalida8212 3 года назад

    Gio, how many videos do you planning to realese? And when we'll reach the third section of the course - the advanced one? Greetings from Poland

    • @ProgramWithGio
      @ProgramWithGio  3 года назад +5

      Hello. Just PDO/MySQL videos left for second section. So probably 2-3 videos and we move on to 3rd. We'll work on a project in third section and cover more advanced stuff

  • @benderbg
    @benderbg 10 дней назад

    Is there a reason why I'm not getting save dialog for files? File is still downloded from the "server", its just not giving me the option to select download location in both Chrome and Firefox.

    • @ProgramWithGio
      @ProgramWithGio  3 дня назад

      Check console & see if there are any errors

  • @truthteachers
    @truthteachers Год назад +1

    Thanks a lot, bro

  • @samuelaniogbu5089
    @samuelaniogbu5089 Год назад +1

    What php text did you read man?
    Youre like my personal php gpt.
    Going forward, anything i didn't learn from your channel cannot be used in production.

    • @ProgramWithGio
      @ProgramWithGio  Год назад

      Heh, thank you 🙌. I mostly read documentation & articles. I generally just do a lot of research to make sure I have facts right

  • @developeralimcu
    @developeralimcu 2 года назад

    it will more help full for us if you push the code on github dear

    • @ProgramWithGio
      @ProgramWithGio  2 года назад

      In later videos code is pushed to GitHub. In some videos we don't do much so I don't push just small snippets.

  • @kacperkaczmarczyk659
    @kacperkaczmarczyk659 Год назад

    What is difference between Http 1.1 and 2.0 in create header like HTTP/1.1 404 Not Found. It will be working the same?

    • @ProgramWithGio
      @ProgramWithGio  Год назад +1

      http 2.0 should be faster/more efficient. You can read up on the exact differences between the two online, here is one as an example: www.digitalocean.com/community/tutorials/http-1-1-vs-http-2-what-s-the-difference

  • @hajiomary4913
    @hajiomary4913 7 месяцев назад

    I try to implement download like you, and it works on firefox and not on chrome by saying insecure download blocked. WHY?

    • @ProgramWithGio
      @ProgramWithGio  6 месяцев назад +1

      Something specific to your browser (security features) maybe or mismatching header, works fine on my end

    • @hajiomary4913
      @hajiomary4913 6 месяцев назад

      Ok! Thanks bro, Another issue is I don't get a download window when I load a page is automatically downloaded and saved. @@ProgramWithGio

  • @dancarter6044
    @dancarter6044 Год назад

    Why not use .htaccess to redirect a 404 to a special page.

    • @ProgramWithGio
      @ProgramWithGio  Год назад +1

      You could, but we are not using htaccess files, we are using nginx in this section, not apache. Also its better to handle such cases via routing within the application

  • @AtomTCP
    @AtomTCP 2 года назад

    Nice but this dont redirect me to 403 page what i included in htaccess

    • @ProgramWithGio
      @ProgramWithGio  2 года назад

      Not sure what you mean, can you share your code? You can send me a DM on Twitter & send me the screenshot and I can take a look

  • @user-mp8yh6gl6r
    @user-mp8yh6gl6r 3 года назад

    how can i link file in folder 1 with a file in folder2 , i am coding : include_once 'fp/header.php'

    • @ProgramWithGio
      @ProgramWithGio  3 года назад

      You can use include or require to do that but better way is to use namespaces. Watch the lesson about include and require and then watch the lessons about namespaces and autoloading, the link to playlist is in the description of this video

  • @isaacsouza17
    @isaacsouza17 3 года назад

    So what are we going to build? Got curious now

    • @ProgramWithGio
      @ProgramWithGio  3 года назад

      Talked about it a bit at the end of first section. Going to be expense tracker kind of like budgeting app.

    • @isaacsouza17
      @isaacsouza17 3 года назад +1

      @@ProgramWithGio really? Completely missed it. Anyways, it will be fun, waiting for it

  • @abdfadee8267
    @abdfadee8267 7 месяцев назад

    .

  • @rustavellyne
    @rustavellyne Год назад

    Thank you!