Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
is there any function or class that converts you@yourdomain.com into
you [at] yourdomain [dot] com when an actual email is passed to the class/function?
I wroteCode: Select all
<?php
//initialize spam-off function (embed it inna page) - JavaScript
function mailto($address,$text='',$subject=''){
$address="user@mail.com";
#divide user from host (cut on @)
$data = explode("@","$address");
#a little extra make-up
$hostitj = ereg_replace("\.", ' <u>[dot]</u> ', $data[1]);
#if no text present, display address, just a little formatted
if ("$text" == "") { $text = $data[0] . ' <u>[at]</u> ' . $hostitj; }
#write link
echo "<a href=\"" . $data[1] . "','" . $data[0] . "'\">" . $text . "</a>";
}
?>feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]