summaryrefslogtreecommitdiff
path: root/zend/demos/Zend/Gdata/YouTubeVideoApp/session_details.php
diff options
context:
space:
mode:
authorHorus32014-02-24 16:42:14 +0100
committerHorus32014-02-24 16:42:14 +0100
commit06f945f27840b53e57795dadbc38e76f7e11ab1c (patch)
tree689d5c7f4ffa15460c7e90f47c6a7dd59ce4e8bd /zend/demos/Zend/Gdata/YouTubeVideoApp/session_details.php
downloadrandom-06f945f27840b53e57795dadbc38e76f7e11ab1c.tar.gz
init
Diffstat (limited to 'zend/demos/Zend/Gdata/YouTubeVideoApp/session_details.php')
-rwxr-xr-xzend/demos/Zend/Gdata/YouTubeVideoApp/session_details.php66
1 files changed, 66 insertions, 0 deletions
diff --git a/zend/demos/Zend/Gdata/YouTubeVideoApp/session_details.php b/zend/demos/Zend/Gdata/YouTubeVideoApp/session_details.php
new file mode 100755
index 0000000..dd4e996
--- /dev/null
+++ b/zend/demos/Zend/Gdata/YouTubeVideoApp/session_details.php
@@ -0,0 +1,66 @@
+<?php
+/**
+ * Zend Framework
+ *
+ * LICENSE
+ *
+ * This source file is subject to the new BSD license that is bundled
+ * with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://framework.zend.com/license/new-bsd
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@zend.com so we can send you a copy immediately.
+ *
+ * @category Zend
+ * @package Zend_Gdata
+ * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+/**
+ * PHP sample code for the YouTube data API. Utilizes the Zend Framework
+ * Zend_Gdata component to communicate with the YouTube data API.
+ *
+ * Requires the Zend Framework Zend_Gdata component and PHP >= 5.2.11
+ * This sample is run from within a web browser. These files are required:
+ * session_details.php - a script to view log output and session variables
+ * operations.php - the main logic, which interfaces with the YouTube API
+ * index.php - the HTML to represent the web UI, contains some PHP
+ * video_app.css - the CSS to define the interface style
+ * video_app.js - the JavaScript used to provide the video list AJAX interface
+ *
+ * NOTE: If using in production, some additional precautions with regards
+ * to filtering the input data should be used. This code is designed only
+ * for demonstration purposes.
+ */
+session_start();
+?>
+<html>
+<head>
+ <title>YouTube data API Video Browser in PHP - Session Viewer</title>
+ <link href="video_app.css" type="text/css" rel="stylesheet"/>
+ <script src="video_app.js" type="text/javascript"></script>
+</head>
+<body>
+<div id="mainSessions">
+ <div id="titleBar">
+ <div id="titleText"><h3>Session variables</h3></div><br clear="all" />
+ </div>
+<?php
+
+$session_copy = $_SESSION;
+ksort($session_copy);
+
+foreach($session_copy as $key => $value) {
+
+ print '<h3>'. $key . '</h3><div id="sessionVariable" >'. $value .'</div><br />'.
+ '<form method="POST" action="operations.php">' .
+ '<input type="hidden" value="clear_session_var" name="operation"/>'.
+ '<input type="hidden" name="name" value="'. $key .'"/>'.
+ '<input type="submit" value="click to delete"/></form><hr />';
+}
+?>
+<br clear="both" />
+<a href="index.php">back</a>
+ </div></body></html>