PHP Classes

File: ifobtest.php

Recommend this page to a friend!
  Classes of Michael A. Peters   CSP Filter   ifobtest.php   Download  
File: ifobtest.php
Role: Auxiliary script
Content type: text/plain
Description: Example iframe/object
Class: CSP Filter
Filter HTML based on Content Security Policy
Author: By
Last change:
Date: 14 years ago
Size: 630 bytes


Class file image Download
if (isset($_GET['type'])) {
$foo = strtolower($_GET['type']);
   } else {
$foo = "iframe";
if (
strcmp($foo,"object") == 0) {
$type = "object";
   } else {
$type = "iframe";
<h1>This is an <?php echo(ucfirst($type));?></h1>
It looks like you are viewing this page via <a href="README.html" target="_top">README.html</a>, hence you see the contents of an <?php echo($type);?>. If viewing this page via <a href="index.php" target="_top">index.php</a> you should see the children of the <?php echo($type);?> node, not this paragraph.</p>