Login   Register  
PHP Classes
elePHPant
Icontem

File: sample.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Jonathan Discipulo  >  Entitize Class  >  sample.php  >  Download  
File: sample.php
Role: Example script
Content type: text/plain
Description: Sample file
Class: Entitize Class
Convert text into HTML entities
Author: By
Last change:
Date: 7 years ago
Size: 676 bytes
 

Contents

Class file image Download
<?php

include('class.entitize.php');

$class = new Entitize();

$email $class->convert('jonathan@exploitedweb.com');
$mobile $class->convert('+63.926.7472602');
$text1 $class->convert('This line should not be indexed by search engines.');
$text2 $class->convert('This line is readable in web page but not in source code.');

echo 
"<p>My email address is {$email}.</p>\r\n";
echo 
"<p>You can contact me via SMS at {$mobile}.</p>\r\n";
echo 
"<p>{$text1}</p>\r\n";
echo 
"<p>This line is readable both in web page and source code.</p>\r\n";
echo 
"<p>{$text2}</p>\r\n";
echo 
"<p>View the source code of this page to see entitized strings.</p>\r\n";

?>