Join Kevin Skoglund for an in-depth discussion in this video Convert a time string to a timestamp, part of Easy PHP Projects: Single-Serving Sites.
- View Offline
- Exercise Files
- In this movie, we will create a Single-Serving Site…that will answer the question,…"Is Star Wars out yet?"…At the time that I'm recording this,…the hype for the next Star Wars film, Episode VII,…is very high.…The exact event is not important.…The same principles can be applied to any date.…You could substitute in a different movie,…a graduation date, a wedding date,…or any other milestone.…The important technique is learning how to compare…two dates in PHP.…We've already discussed Unix Timestamps.…Unix Timestamps are the number of seconds…since January 1, 1970.…
Timestamps are just numbers,…so we can work with them like numbers.…The seconds can be multiplied, added, and compared.…So a minute would be just 60.…That's 60 seconds.…An hour would be 60 of those minutes.…Then a day would be 24, times 60, times 60.…So when we look at that, we think, 24,…that's the number of hours,…60 is the number of minutes,…the last 60 is the number of seconds.…
Or you could variables and multiply them this way.…So a week would be seven times…
- 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
Building a Responsive Single-Page Design with Sasswith Ray Villalobos4h 55m Intermediate
Exporting Data to Files with PHPwith David Powers3h 42m Intermediate
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?
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.