icon Get the most out of Surmunity, read our tips here! Need an interesting blog to read? You've got to read the Surpass Blog! | Welcome! Please register to access all of our features.

» Surpass Web Hosting Forums » Discussions » Email » Using an open-ended mail form on my site?

Email General questions, webmail, mailing lists.

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread
Old May 13th, 2005, 7:28 PM   #1 (permalink)
Registered User
Seasoned Poster
 
Joined in Jan 2004
Hosted on pass5
44 posts
Gave thanks: 0
Thanked 0 times
Using an open-ended mail form on my site?

I'd like to offer my users the opportunity to email anyone with an emil address from my site annonomously. ie they input a recipient address, type a message and press send.

Will this just be used by spammers?

Thanks
__________________
Reseller account on pass5
specialk is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old May 13th, 2005, 8:35 PM   #2 (permalink)
Surpass Fan
Super #1
 
Joined in Aug 2004
Hosted on SH58
1,688 posts
Gave thanks: 6
Thanked 7 times
add in one of those random number generators and make them type it in.
__________________
- Evan Charlton | [site] | Server - SH58
Kickersny.com is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old May 13th, 2005, 11:50 PM   #3 (permalink)
Registered User
On a golden path...
 
scottmcarthur's Avatar
 
Joined in Jun 2004
Lives in UK
Hosted on Pass7
394 posts
Gave thanks: 0
Thanked 1 Time in 1 Post
Here's a php script to produce turing numbers dynamically. You need to use session variables with this but if you undertstand PHP its very straight forward. It produces the turing image like the one on my site (http://www.coderhosting.com/purchase.php?package=0) . You need to put the desired display font in the directory with it as 'font.ttf'

PHP Code:
<?php

session_start
();

$src  'ABCDEFGHIJKLMNPQRSTUVWXYZ';
$src .= '23456789';
$srclen strlen($src)-1;
$length 8;
$font 'font.ttf';
$output_type='jpeg';
//$output_type='png';

/* font size range, angle range, character padding */

$min_font_size 16;
$max_font_size 16;
$min_angle = -15;
$max_angle 15;
$char_padding 4;


/* initialize variables */

$_SESSION['turing_string'] = '';
$data = array();
$image_width $image_height 0;


/* build the data array of the characters, size, placement, etc. */

for($i=0$i<$length$i++) {

    
$char substr($srcmt_rand(0,$srclen), 1);
    
$_SESSION['turing_string'] .= $char;

    
$size mt_rand($min_font_size$max_font_size);
    
$angle mt_rand($min_angle$max_angle);

    
$bbox ImageTTFBBox$size$angle$font$char );

    
$char_width max($bbox[2],$bbox[4]) - min($bbox[0],$bbox[6]);
    
$char_height max($bbox[1],$bbox[3]) - min($bbox[7],$bbox[5]);

    
$image_width += $char_width $char_padding;
    
$image_height max($image_height$char_height);

    
$data[] = array(
        
'char'        => $char,
        
'size'        => $size,
        
'angle'        => $angle,
        
'height'    => $char_height,
        
'width'        => $char_width,
    );
}


/* calculate the final image size, adding some padding */

$x_padding 12;
$image_width += ($x_padding 2);
$image_height = ($image_height 1.5) + 2;


/* build the image, and allocte the colors */

$im ImageCreate($image_width$image_height);
$r 51 mt_rand(4,5);
$g 51 mt_rand(4,5);
$b 51 mt_rand(4,5);
$color_bg        ImageColorAllocate($im,  124,  124,  124 );

$r 51 mt_rand(3,4);
$g 51 mt_rand(3,4);
$b 51 mt_rand(3,4);
$color_line0    ImageColorAllocate($im,  $r,  $g,  $b );

$r 51 mt_rand(3,4);
$g 51 mt_rand(3,4);
$b 51 mt_rand(3,4);
$color_line1    ImageColorAllocate($im,  $r,  $g,  $b );

$r 51 mt_rand(1,2);
$g 51 mt_rand(1,2);
$b 51 mt_rand(1,2);
$color_text        ImageColorAllocate($im,  255,  255,  255 );
$color_border      ImageColorAllocate($im,   92,   92,   92 );
$color_bk          ImageColorAllocate($im,   51,   51,   51 );


/* make the random background lines */

for($l=0$l<4$l++) {

    
$c 'color_line' . ($l%2);

    
$lx mt_rand(0,$image_width+$image_height);
    
$lw mt_rand(0,3);
    
ImageFilledRectangle($im$lx0$lx+$lw$image_height-1, $$c );
}




/* output each character */

$pos_x $x_padding + ($char_padding 2);
foreach(
$data as $d) {

    
$pos_y = ( ( $image_height $d['height'] ) / );
    
ImageTTFText($im$d['size'], $d['angle'], $pos_x$pos_y$color_text$font$d['char'] );

    
$pos_x += $d['width'] + $char_padding;

}


/* a nice border */

//ImageRectangle($im, 0, 0, $image_width-1, $image_height-1, $color_border);
//ImageRectangle($im, 1, 1, $image_width-2, $image_height-2, $color_bk);



/* display it */


switch ($output_type) {
  case 
'jpeg':
    
Header('Content-type: image/jpeg');
    
ImageJPEG($im,NULL,100);
    break;

  case 
'png':
  default:
    
Header('Content-type: image/png');
    
ImagePNG($im);
    break;
}
ImageDestroy($im);

?>
Hope that helps
scottmcarthur is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old May 16th, 2005, 10:02 AM   #4 (permalink)
Registered User
Seasoned Poster
 
Joined in Jan 2004
Hosted on pass5
44 posts
Gave thanks: 0
Thanked 0 times
That's brilliant, thanks guys!
__________________
Reseller account on pass5
specialk is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On