Join Kevin Skoglund for an in-depth discussion in this video Finding browser window size, part of Easy PHP Projects: Single-Serving Sites.
- In this movie we'll learn how to include…the current browser window size…in our browser mirror single-serving site.…Before we dive into the code…about finding the browser window size,…I first want us to look at a website together,…which is whatsmy.browsersize.com.…So whatsmy.browsersize.com…does exactly what you expect.…It shows you your current browser size.…So here it is, the dimensions.…It says the Browser window width for me is 1156.…
My Browser window height is 624…and then it shows my overall Screen width is 1280…and my Screen height is 80.…Let's just readjust this page,…let's reload it,…and now you can see a change.…My width, especially, jumped down to 941…because I made my window narrower.…And that's all it does…and that's because this is another example…of a single-serving site.…It does exactly what we are talking about.…Now, there's one problem with this, though,…and that's that we can't determine the browser window size…using PHP and that's because there's not enough information…in the request.…
When the web was first created,…
- 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.