SlideShare a Scribd company logo
1 of 15
Reading, Writing and Securing
    Session and Cookies
Overview
Objective

Learn how to read and write data to cookies and session
and also how to secure your cookies and sessions.

Requirements

 Understanding of Cookies and Sessions in PHP
Estimated Time

10 Minutes
Follow Along With Code
           Example
1. Download a copy of the example code at
  www.prodigyview.com/source.

2. Install the system in an environment you feel
  comfortable testing in.

3. Proceed to examples/system/Sessions.php
Disable Session in Bootstrap
Normally in ProdigyView when the bootstrap is called, the
session configuration is created and set based upon the
values in the xml configuration file. But for the purposes of
this tutorial we are going to manually set the variables.

Lets start by creating a custom bootstrap that disables the
initialization of the sessions.
Session Init
Before we initialize the session, we should set what options
we want. In this example we are only setting the lifetime of
the cookie and the session. By default, the PVSession::init()
method will call session_start() function for us. Keep in mind
there are many more options that can passed to the init.




                       www.prodigyview.com
Setting Up Test Variables
Perfect, now we have an active session ready to set data
in. First create some sample data to insert and retrieve
from cookies and session.




                   www.prodigyview.com
Basic Cookie
       With our data we are now going to write and read a basic
       cookie. This can be simply done with the methods
       writeCookie, readCookie and deleteCookie.


  1. Set the key/name of the cookie        2. Set the cookie data based on the key/name




                                                    3. Read the cookie data basef on the key/name


4. Delete the cookie associated with the key/name
Arrays and Cookies
    Normally in PHP you cannot set arrays or objects in
    Cookies and Sessions. Well in ProdigyView this can be
    done. Just write and read the cookie like you normally
    would.

1. Set the key/name of the cookie               2. Set the array or object associated to be
                                                associated with the key/name




Delete the cookie                                Retrieve the cookie by entering the name/key

                                    www.prodigyview.com
Secure Cookie
      Sometimes a requirement maybe(and still strongly not
      advised) to store sensitive information in a cookie.
      ProdigyView allows a cookie to be encrypted. In the
      options passed into cookie, set the hash cookie to true.


1. The the options for hashing a cookie        2. Pass the options in when writing and
                                               reading the cookie




                    3. The options should also be passed when deleting a cookie
Writing a Session
        Writing a session is very similar to writing a cookie. The
        methods are writeSession, readSession, and
        deleteSession.


1. Set the key/name of the session        2. Set the data to be associated with that key/name




    4. Delete the data from the session                     3. Retrieve the data associated
                                                            with the key/name


                                     www.prodigyview.com
Store Array in Sessions
      Like cookies, objects and arrays can be stored in a
      session.


1. Set the key/name of the session        2. Set the object or array to be associated with that
                                          key/name




4. Delete the array or object from the session               3. Retrieve the array or object




                                     www.prodigyview.com
Secure Session
   Now if you want, you can encrypt data stored in a session.
   Whether or not this is necessary is controversial because
   the session is stored on the server and not accessible to the
   client.



1. The the options for hashing a session       2. Pass the options in when writing and
                                               reading the session




                    3. The options should also be passed when deleting a session
Challenge!
This is a challenge designed to better help you understand
sessions and cookies in Prodigyview and PHP.
1. Create an object that contains public, private and
   protected variables. 1 of each is fine.
2. Set those variables with values. Make sure you can
   retrieve those values.
3. Write the object to a session or cookie normally and
   write the object to a session or cookie that is encrypted.
4. Read back the object and access the variables. Record
   the results.
Review
1. Use PVSession::writeCookie() to write a cookie
2. Use PVSession::readCookie() to read a cookie
3. Use PVSession::deleteCookie() to remove a cookie
4. Use PVSession::writeSession() to write a session
5. Use PVSession::readSession() to read a session
6. Use PVSession::deleteSession() to remove a session




                    www.prodigyview.com
API Reference
For a better understanding of the sessions, visit the api by
clicking on the link below.

PVSession




                     More Tutorials
For more tutorials, please visit:
http://www.prodigyview.com/tutorials



                         www.prodigyview.com

More Related Content

Viewers also liked

Chapter 07 php forms handling
Chapter 07   php forms handlingChapter 07   php forms handling
Chapter 07 php forms handlingDhani Ahmad
 
PHP Cookies and Sessions
PHP Cookies and SessionsPHP Cookies and Sessions
PHP Cookies and SessionsNisa Soomro
 
PHP Files: An Introduction
PHP Files: An IntroductionPHP Files: An Introduction
PHP Files: An IntroductionJacques Woodcock
 
Session Management & Cookies In Php
Session Management & Cookies In PhpSession Management & Cookies In Php
Session Management & Cookies In PhpHarit Kothari
 
PHP Cookies, Sessions and Authentication
PHP Cookies, Sessions and AuthenticationPHP Cookies, Sessions and Authentication
PHP Cookies, Sessions and AuthenticationGerard Sychay
 
Form Processing In Php
Form Processing In PhpForm Processing In Php
Form Processing In PhpHarit Kothari
 

Viewers also liked (11)

Cookies & Session
Cookies & SessionCookies & Session
Cookies & Session
 
Chapter 07 php forms handling
Chapter 07   php forms handlingChapter 07   php forms handling
Chapter 07 php forms handling
 
PHP Cookies and Sessions
PHP Cookies and SessionsPHP Cookies and Sessions
PHP Cookies and Sessions
 
PHP Files: An Introduction
PHP Files: An IntroductionPHP Files: An Introduction
PHP Files: An Introduction
 
3 php forms
3 php forms3 php forms
3 php forms
 
Session Management & Cookies In Php
Session Management & Cookies In PhpSession Management & Cookies In Php
Session Management & Cookies In Php
 
PHP Cookies, Sessions and Authentication
PHP Cookies, Sessions and AuthenticationPHP Cookies, Sessions and Authentication
PHP Cookies, Sessions and Authentication
 
Form Processing In Php
Form Processing In PhpForm Processing In Php
Form Processing In Php
 
Php forms
Php formsPhp forms
Php forms
 
OOPS IN C++
OOPS IN C++OOPS IN C++
OOPS IN C++
 
Cookie and session
Cookie and sessionCookie and session
Cookie and session
 

More from ProdigyView

Installing Plug-ins
Installing Plug-insInstalling Plug-ins
Installing Plug-insProdigyView
 
Building An Application
Building An ApplicationBuilding An Application
Building An ApplicationProdigyView
 
Installing Applications
Installing ApplicationsInstalling Applications
Installing ApplicationsProdigyView
 
Video Content Management
Video Content ManagementVideo Content Management
Video Content ManagementProdigyView
 
Audio Content Management
Audio Content ManagementAudio Content Management
Audio Content ManagementProdigyView
 
File Content Management
File Content ManagementFile Content Management
File Content ManagementProdigyView
 
Email Configuration
Email ConfigurationEmail Configuration
Email ConfigurationProdigyView
 
HTML5 Tags and Elements Tutorial
HTML5 Tags and Elements TutorialHTML5 Tags and Elements Tutorial
HTML5 Tags and Elements TutorialProdigyView
 
HTML Forms Tutorial
HTML Forms TutorialHTML Forms Tutorial
HTML Forms TutorialProdigyView
 
Html Tags Tutorial
Html Tags TutorialHtml Tags Tutorial
Html Tags TutorialProdigyView
 
Video Conversion PHP
Video Conversion PHPVideo Conversion PHP
Video Conversion PHPProdigyView
 
Sending Email Basics PHP
Sending Email Basics PHPSending Email Basics PHP
Sending Email Basics PHPProdigyView
 
Tools ProdigyView
Tools ProdigyViewTools ProdigyView
Tools ProdigyViewProdigyView
 
Custom Validation PHP
Custom Validation PHPCustom Validation PHP
Custom Validation PHPProdigyView
 
Basic File Cache Tutorial - PHP
Basic File Cache Tutorial - PHPBasic File Cache Tutorial - PHP
Basic File Cache Tutorial - PHPProdigyView
 
Understanding Web Cache
Understanding Web CacheUnderstanding Web Cache
Understanding Web CacheProdigyView
 
Javascript And CSS Libraries
Javascript And CSS LibrariesJavascript And CSS Libraries
Javascript And CSS LibrariesProdigyView
 
SQL Prepared Statements Tutorial
SQL Prepared Statements TutorialSQL Prepared Statements Tutorial
SQL Prepared Statements TutorialProdigyView
 

More from ProdigyView (20)

Installing Plug-ins
Installing Plug-insInstalling Plug-ins
Installing Plug-ins
 
Building An Application
Building An ApplicationBuilding An Application
Building An Application
 
Installing Applications
Installing ApplicationsInstalling Applications
Installing Applications
 
Video Content Management
Video Content ManagementVideo Content Management
Video Content Management
 
Audio Content Management
Audio Content ManagementAudio Content Management
Audio Content Management
 
File Content Management
File Content ManagementFile Content Management
File Content Management
 
Email Configuration
Email ConfigurationEmail Configuration
Email Configuration
 
HTML5 Tags and Elements Tutorial
HTML5 Tags and Elements TutorialHTML5 Tags and Elements Tutorial
HTML5 Tags and Elements Tutorial
 
HTML Forms Tutorial
HTML Forms TutorialHTML Forms Tutorial
HTML Forms Tutorial
 
Html Tags Tutorial
Html Tags TutorialHtml Tags Tutorial
Html Tags Tutorial
 
Video Conversion PHP
Video Conversion PHPVideo Conversion PHP
Video Conversion PHP
 
Sending Email Basics PHP
Sending Email Basics PHPSending Email Basics PHP
Sending Email Basics PHP
 
Tools ProdigyView
Tools ProdigyViewTools ProdigyView
Tools ProdigyView
 
Custom Validation PHP
Custom Validation PHPCustom Validation PHP
Custom Validation PHP
 
Basic File Cache Tutorial - PHP
Basic File Cache Tutorial - PHPBasic File Cache Tutorial - PHP
Basic File Cache Tutorial - PHP
 
Understanding Web Cache
Understanding Web CacheUnderstanding Web Cache
Understanding Web Cache
 
Javascript And CSS Libraries
Javascript And CSS LibrariesJavascript And CSS Libraries
Javascript And CSS Libraries
 
PHP Libraries
PHP LibrariesPHP Libraries
PHP Libraries
 
SQL Prepared Statements Tutorial
SQL Prepared Statements TutorialSQL Prepared Statements Tutorial
SQL Prepared Statements Tutorial
 
Database Basics
Database BasicsDatabase Basics
Database Basics
 

Recently uploaded

Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 

Recently uploaded (20)

Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 

Reading, Writing and Securing Session and Cookies - PHP

  • 1. Reading, Writing and Securing Session and Cookies
  • 2. Overview Objective Learn how to read and write data to cookies and session and also how to secure your cookies and sessions. Requirements  Understanding of Cookies and Sessions in PHP Estimated Time 10 Minutes
  • 3. Follow Along With Code Example 1. Download a copy of the example code at www.prodigyview.com/source. 2. Install the system in an environment you feel comfortable testing in. 3. Proceed to examples/system/Sessions.php
  • 4. Disable Session in Bootstrap Normally in ProdigyView when the bootstrap is called, the session configuration is created and set based upon the values in the xml configuration file. But for the purposes of this tutorial we are going to manually set the variables. Lets start by creating a custom bootstrap that disables the initialization of the sessions.
  • 5. Session Init Before we initialize the session, we should set what options we want. In this example we are only setting the lifetime of the cookie and the session. By default, the PVSession::init() method will call session_start() function for us. Keep in mind there are many more options that can passed to the init. www.prodigyview.com
  • 6. Setting Up Test Variables Perfect, now we have an active session ready to set data in. First create some sample data to insert and retrieve from cookies and session. www.prodigyview.com
  • 7. Basic Cookie With our data we are now going to write and read a basic cookie. This can be simply done with the methods writeCookie, readCookie and deleteCookie. 1. Set the key/name of the cookie 2. Set the cookie data based on the key/name 3. Read the cookie data basef on the key/name 4. Delete the cookie associated with the key/name
  • 8. Arrays and Cookies Normally in PHP you cannot set arrays or objects in Cookies and Sessions. Well in ProdigyView this can be done. Just write and read the cookie like you normally would. 1. Set the key/name of the cookie 2. Set the array or object associated to be associated with the key/name Delete the cookie Retrieve the cookie by entering the name/key www.prodigyview.com
  • 9. Secure Cookie Sometimes a requirement maybe(and still strongly not advised) to store sensitive information in a cookie. ProdigyView allows a cookie to be encrypted. In the options passed into cookie, set the hash cookie to true. 1. The the options for hashing a cookie 2. Pass the options in when writing and reading the cookie 3. The options should also be passed when deleting a cookie
  • 10. Writing a Session Writing a session is very similar to writing a cookie. The methods are writeSession, readSession, and deleteSession. 1. Set the key/name of the session 2. Set the data to be associated with that key/name 4. Delete the data from the session 3. Retrieve the data associated with the key/name www.prodigyview.com
  • 11. Store Array in Sessions Like cookies, objects and arrays can be stored in a session. 1. Set the key/name of the session 2. Set the object or array to be associated with that key/name 4. Delete the array or object from the session 3. Retrieve the array or object www.prodigyview.com
  • 12. Secure Session Now if you want, you can encrypt data stored in a session. Whether or not this is necessary is controversial because the session is stored on the server and not accessible to the client. 1. The the options for hashing a session 2. Pass the options in when writing and reading the session 3. The options should also be passed when deleting a session
  • 13. Challenge! This is a challenge designed to better help you understand sessions and cookies in Prodigyview and PHP. 1. Create an object that contains public, private and protected variables. 1 of each is fine. 2. Set those variables with values. Make sure you can retrieve those values. 3. Write the object to a session or cookie normally and write the object to a session or cookie that is encrypted. 4. Read back the object and access the variables. Record the results.
  • 14. Review 1. Use PVSession::writeCookie() to write a cookie 2. Use PVSession::readCookie() to read a cookie 3. Use PVSession::deleteCookie() to remove a cookie 4. Use PVSession::writeSession() to write a session 5. Use PVSession::readSession() to read a session 6. Use PVSession::deleteSession() to remove a session www.prodigyview.com
  • 15. API Reference For a better understanding of the sessions, visit the api by clicking on the link below. PVSession More Tutorials For more tutorials, please visit: http://www.prodigyview.com/tutorials www.prodigyview.com