Hi folks

Problem:

I'm trying to protect a heap of email addresses on lots of pages from
spammers. The pages are static pages on another site, (reason, they have to
be), but as some of them are generated on my site using PHP/MYSQL I thought
that the best way would be to redirect mail links to a popup form on my site
that could grab the name and email address from the DB etc.  This I have
working fine.

But what I'd like to do is have the mailform coming up with no toolbar,
locationbar etc. After much browsing it looks like I can't change the window
attribs once it's opened. I don't want to have to change 100's of pages to
include a js on top to set these properties

My Solution:

So I thought that although it may be a long way round (although quicker than
changing heaps of pages) was to create a redirector popup page that calls
the Mailform with everything turned off then automatically shuts itself.

I know that maybe this is not strictly PHP/MYSQL related but I figured that
someone might have other ideas or might even have done this themselves.  My
some-what clumbsy code is below.

<HTML>
<?php

if (!isset($senditto)) {
        $MailTo = "[EMAIL PROTECTED]";
}else {
        $whoto = $senditto;
}
if (!isset($fwdsite)) {
        $sitename = "unlisted";
} else {
        $sitename = stripslashes($fwdsite);
}
if (!isset($cat)) {
        $lookupdb = "nocat";
} else {
        $lookupdb = stripslashes($cat);
}
if (!isset($nabout)) {
        $about = "nosubject";
} else {
        $about = stripslashes($nabout);
}
if (!isset($ctype)) {
        $ctype = "c1";
}

$whereto =
"http://www.somewhere.com/mailform.php?senditto=".$whoto."&fwdsite=".$sitena
me."&cat=".$lookupdb."&nabout=".$about."&ctype=".$ctype

?>
<HEAD>
<SCRIPT language="JavaScript">
<!--
function openWindow(url) {
   popupWin = window.open(url,'MailRedirector',
'top=20,left=20,resizable=no,width=640,height=
480,scrollbars=no,menubar=no,toolbar=no')
}
var StayAlive = 15; // Number of seconds to keep window open
function KillMe(){
   setTimeout("self.close()",StayAlive * 1000);
}
--!>
</SCRIPT>
<NOSCRIPT>
<META http-equiv="Refresh" content="0; URL=<?php echo "$whereto"; ?>">
</NOSCRIPT>
<title>Mailform redirector</title>
</HEAD>

<BODY onload="openWindow(<?php echo "$whereto"; ?>);KillMe();self.focus()">
<font size=3>
<div align="center">Mail Form Redirection Page</div>
</font>
</BODY>
</HTML>

Any ideas anyone?

TIA

Howard


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to