Join Kevin Skoglund for an in-depth discussion in this video Decode request time, part of Easy PHP Projects: Single-Serving Sites.
- In this movie, we'll learn how to format the request time…into a human-readable string.…We're going to do that by using the PHP date function.…And you can find out more information…about the function on the php.net website.…What the date function does, specifically,…is converts a UNIX timestamp into a formatted string.…And that's exactly what we want.…We want to take this UNIX timestamp…that we're getting back from the request time…and turn it into something that's readable.…A UNIX timestamp is the number of seconds…since January 1, 1970.…
And that's really not useful to us.…What we want to see is, in a meaningful way,…that it's January the 3rd of 2015.…That's what we want to see.…So the way that the date function works is like this.…It takes two arguments, the first of which…is the format and the second is the timestamp.…And the timestamp we've seen.…We just drop that right in there, no problem.…But the format, we need to decide…what we want the format to look like.…That page on the php.net website…gives all the different possibilities…
- Finding and validating an IP address with PHP
- Parsing the HTTP request for browser details
- Comparing dates and times in PHP
- Randomizing data with PHP
- Styling page content dynamically
- Generating random sentences
Skill Level Beginner
1. What is My IP Address?
2. Browser Mirror
3. Is it New Years Yet?
4. Random Data and Styling
5. Random Phrase Generator
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.