Login   Register  
PHP Classes
elePHPant
Icontem

File: mailto_encoder_test.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Konstantinos Dafalias  >  Mailto Encoder  >  mailto_encoder_test.php  >  Download  
File: mailto_encoder_test.php
Role: Example script
Content type: text/plain
Description: Sample script
Class: Mailto Encoder
Encode email address links with character entities
Author: By
Last change:
Date: 10 years ago
Size: 1,251 bytes
 

Contents

Class file image Download
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
<head>
<title>Mailto-Encoder test</title>
<style type="text/css">
 <!--

 a.myclass {
     text-decoration: none;
     color: Olive;
 }
 a.myclass:hover{
     text-decoration: underline;
 }
 body {
     background-color: #FAF0E6;
     font-family: Arial, Helvetica, sans-serif;
 }
 -->
</style>
</head>
<body>
<?php

include_once("mailto_encoder.php");

# Please view HTML source of the result page to see what the class does

# Only email address 
$sEmail "test@testing.gugu";

echo(
"Original mail address: $sEmail<br /><br />");

$oEncodedmail = new cMailto_encoder();

# Only email address 
echo("Email address only: ".$oEncodedmail->mailto_encode($sEmail)."<br /><br />");

# Email address and link text
echo("Email address and link text: ".$oEncodedmail->mailto_encode($sEmail"Send me an email, PLEASE!")."<br /><br />");

# Email address with style class and Params
$aParams = Array("subject"=>"Mail from my website""body"=>"Hi! I am sending You this email because I am bored");
echo(
"Email address with style class and Params: ".$oEncodedmail->mailto_encode($sEmail"""myclass"$aParams)."<br /><br />");
?>
wer
</body>
</html>