Jump to content

pietbez

Members
  • Posts

    65
  • Joined

  • Last visited

Posts posted by pietbez

  1. briliant! never thought of that!

    how many mails per account/batch can these handle 200? 300?

     

    and would the php mailer be able to devide the database up into these batches automaticaly?

     

    i know, probably a stupid question??

  2. i have a database of about 3000 opt in/out members. i send mail to them with a php script, but my smtp mail server allows for only 300 mails per day. is it posible to write into the script that the 1srt 300 emails get sent through one mail server, then the next 300 trhough another domains mail server and so on. obviously one would have to have a few domains to do this. Or could someone please tell me the right way to go about this?

    i am a bit stuck. this is NOT for sending spam. all legit registered members

     

    thanks

  3. can anyone tell me why i am getting this message when i want to upload a jpg.

     

    Warning: move_uploaded_file(http://www.dorp.co.uk/releases/pics/destroy.jpg): failed to open stream: HTTP wrapper does not support writeable connections. in /hsphere/local/home/pietbez/dorp.co.uk/cpanel/releases/band.php on line 96

     

    Warning: move_uploaded_file(): Unable to move '/tmp/phpXouqUg' to 'http://www.dorp.co.uk/releases/pics/destroy.jpg' in /hsphere/local/home/pietbez/dorp.co.uk/cpanel/releases/band.php on line 96

    File upload failed!

  4. as you can probably see from my scripting, i am very new at this.

    this script is working but somehow i get the feeling that there is a better or neater or a right way to do this script.

    i would love to learn from the start how to do it right. can anyone iprove on this script so that the outcome is still the same?

    <?
    include('../qazwsxedc/config.php');
    
    mysql_connect($server,$username,$password);
    @mysql_select_db($database) or die ("Unable to connect to the database");
    
    $year=$_POST['year'];
    $month=$_POST['month'];
    $min="$year".'.'."$month".'.'.'00';
    $max="$year".'.'."$month".'.'.'32';
    $do=mysql_query ("SELECT event_date FROM calendar_events WHERE event_date>'$min' and event_date<'$max' and status='confirmed'and event_type='gig' ");
    $x=mysql_num_rows($do);
    if ($x>0) {
    while ($row = mysql_fetch_array($do, MYSQL_ASSOC)) {
      $dates = explode("-",$row["event_date"]);
      $name.="$dates[2]".'.'."$dates[1]".'.'."$dates[0]".' ';
      
    
    
    }
    ;}
    echo "resultstr=".$name;
    ?>

  5. to be honnest, i dont know how to use date time format.

     

    but now i am trying a whole new aproach.

    dont laugh at my code, i am bran new at this  ;D

     

    this gives me output.

     

    now all i have to do is flip the dates around so it reads dd.mm.yyyy so my flash file can read it.

    how do i use explode??

     

    <?
    include('../qazwsxedc/config.php');
    
    mysql_connect($server,$username,$password);
    @mysql_select_db($database) or die ("Unable to connect to the database");
    
    $year=$_POST['year'];
    $month=$_POST['month'];
    $min="$year".'.'."$month".'.'.'00';
    $max="$year".'.'."$month".'.'.'32';
    $do=mysql_query ("SELECT event_date FROM calendar_events WHERE event_date>'$min' and event_date<'$max' and status='confirmed'and event_type='gig' ");
    $x=mysql_num_rows($do);
    if ($x>0) {
    while ($row = mysql_fetch_array($do, MYSQL_ASSOC)) {
      $name.=$row["event_date"];
      $name.=' ';
    
    }
    ;}
    echo "resultstr=".$name;
    ?>

  6. my date format on db used to be "26.02.2008" i have changed it to "2008.02.26" so that i can cronologicaly sort by date.

     

    everything works fine exept for one of my php csripts in my calendar that reads from this table.

     

    this script now gives no output at all.

     

    can anyone please give me some pointers?

     

    <?
    include('functions.php');
    $year=$_POST['year'];
    $month=$_POST['month'];
    
    $sql = "SELECT event_date FROM calendar_events WHERE status='confirmed'and event_type='gig'";
    $result = mysql_query($sql);
    $x=mysql_num_rows($result);
    $postdata='';
    if ($x>0) 
    {
    for ($i=0;$i<$x;++$i) {
    	$row=mysql_fetch_row($result);
    	$data=$row[0];
    	$len=strlen($data);
    	if ($len==9) $data='0'.$data;
    	$monthpoint=strpos($data,'.');
    	$checkmonth=substr($data,$monthpoint+1,2);
    	$checkyear=substr($data,$monthpoint+4);
    
    	if ($year==$checkyear && $month==$checkmonth)
    		if ($postdata=='') $postdata=$postdata.$data; 
    			else $postdata=$postdata.' '.$data;
    	;}
    ;}
    echo "resultstr=".$postdata;
    ?>
    

  7. I have a member DB of about 3000 people and still growing.

    all are legit opt in/out members/subscribers.

    i need to send bulk mail to members on a regular basis.

    using php mail function, the emails go through my webhost. they have a 200 email per day limit.

    this is a problem for me.

     

    is there a way with php to deliver directly to the recipient

     

    built in smtp or something?

  8. can anyone tell me what this mesage means?

    cant log into my control admin page.

     

    Warning: Unknown(): write failed: No space left on device (28) in Unknown on line 0

     

    Warning: Unknown(): Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/tmp) in Unknown on line 0

  9. can anyone spot the problem?

    this script lets me see how many of my members actualy open thier news letters.

    There are 2 tables. "mail_stats" and "members" they both have a field called "clicks"

    i need these to be the same at all times, but for some reason, "members" lag behind by one the whole time.

    when mail_stats/clicks is "1" , members/clicks is still at "0" and so on.

     

    hope my explination is clear.

    thanks

     

    <?php
    
    include './global_functions.php';
    $img = './img.gif';
    
    header('Cache-Control: no-cache, must-revalidate');
    header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
    
    $mail_id = intval($_GET['id']);
    $user_id = intval($_GET['u']);
    
    if ($mail_id != '' and $user_id != '')
    $tmp = $db->sql_query("SELECT clicks FROM mail_stats WHERE user_id = '$user_id' and mail_id = '$mail_id'");
    if ($db->sql_numrows($tmp) > 0)
    {
    $q = "UPDATE mail_stats SET clicks=clicks+1 WHERE user_id = '$user_id' and mail_id = '$mail_id'";
    $db->sql_query("UPDATE members SET clicks=clicks+1 WHERE id = '$user_id'");
    }
    else
    {
    $q = "INSERT INTO mail_stats values ('$user_id', '$mail_id', 1)";
    }
    
    $db->sql_query($q);
    
    header('Location: '.$img);
    return;
    
    ?>

  10. need help please!

    i want to show only current and future events. in other words, filter out all events older than "today"

    but there is a catch,

    at the moment, my date field on the db is in this format "12.02.2008" instead of "2008.02.12"

     

    can anyone help please?

     

    <?
    include('../qazwsxedc/config.php');
    
    mysql_connect($server,$username,$password);
    @mysql_select_db($database) or die ("Unable to connect to the database");
    
    $do=mysql_query ("SELECT event_date FROM calendar_events WHERE event_date>'????????' ");
    $x=mysql_num_rows($do);
    if ($x>0) {
    while ($row = mysql_fetch_array($do, MYSQL_ASSOC)) {
      $event_date=$row["event_date"];}
    }
    echo "date=".$event_date;
    ?>

  11. i am blatantly stupid. this is what i did and ofcource didnt work

     

    {
      $name = $members[$i]['name'];
      $email = $members[$i]['email'];
      
      if (valid_mail($email)) 
      { 
       //$headers .= "To: $name <$email>" . "\r\n";  
       $hf['header'] = str_replace('[name]', $name, $hf_header_tmp);
       $hf['footer'] = str_replace("[email]", $email, $hf['footer']);
       $let_info['content'] = str_replace('[name]', $name, $let_info_tmp);
       $letter_body =$hf['header'].'<br>'.$let_info['content'].'<br>'.$hf['footer'].'<br>';
       $letter_body = str_replace("\n.", "\n..", $letter_body);
       
        if (mail($email, $letter_title, $letter_body, $headers))
        ++$oks;
        else ++$bads;
      }
      else 
      {
       ++$invalids;
      }
    }

  12. i am so new to this, can someone please tell me how to make <email> into a variable in the footer, just like <name> is currently a varialble in the header.

     

    thaks

     

    {

    //$headers .= "To: $name <$email>" . "\r\n";

    $hf['header'] = str_replace('[name]', $name, $hf_header_tmp);

    $let_info['content'] = str_replace('[name]', $name, $let_info_tmp);

    $letter_body =$hf['header'].'<br>'.$let_info['content'].'<br>'.$hf['footer'].'<br>';

    $letter_body = str_replace("\n.", "\n..", $letter_body);

     

    if (mail($email, $letter_title, $letter_body, $headers))

    ++$oks;

    else ++$bads;

    }

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.