Jump to content

adhbvklwqdbviabjiawdnbij

Members
  • Posts

    37
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

adhbvklwqdbviabjiawdnbij's Achievements

Member

Member (2/5)

0

Reputation

  1. I'm trying: exec ("/usr/bin/php send_action.php >/dev/null &"); This file is on the same folder of send_action.php, but its not working...
  2. Something like this? exec('theactioniwanttoexecute.php');
  3. I have an action that will take a long time to finish, so how can I run this action in background? So I will not have to wait it ends...
  4. Ok, i know how to send one email every 30 seconds, but how to send 10 emails every 30 seconds?
  5. Thanks... How can i make the script run in "background"? How can i make the script send 10 email every 30 seconds?
  6. Is there anything I should change on this code? I'll use it to send about 20000 emails... I don't like this one, because while sending the emails, the page keep loading... I kind dont "trust" on this script.. index.php <?php include('config.php'); include('class.phpmailer.php'); include('email.php'); // Get users info $getUser_sql_not_sent = "SELECT * FROM emails WHERE sent = '0'"; $getUser_not_sent = mysql_query($getUser_sql_not_sent); $getUser_num_not_sent = mysql_num_rows($getUser_not_sent); $getUser_sql_sent = "SELECT * FROM emails WHERE sent = '1'"; $getUser_sent = mysql_query($getUser_sql_sent); $getUser_num_sent = mysql_num_rows($getUser_sent); $getUser_sql_all = "SELECT * FROM emails"; $getUser_all = mysql_query($getUser_sql_all); $getUser_num_all = mysql_num_rows($getUser_all); $getUser_sql_accessed = "SELECT * FROM emails WHERE accessed = '1'"; $getUser_accessed = mysql_query($getUser_sql_accessed); $getUser_num_accessed = mysql_num_rows($getUser_accessed); $money = $getUser_num_accessed * 0.20; $money_formated = number_format($money, 2, ',', ''); $x = $getUser_num_sent * 100; $y = $getUser_num_all; $percentage = $x / $y; $percentage_formated = number_format($percentage, 0, '', ''); if ($getUser_num_not_sent == $getUser_num_all) { echo '<form action = "send.php" method = "post">'; echo '<strong>Assunto do Email</strong><br />'; echo $emailSubject; echo '<br />'; echo '<strong>Corpo do Email</strong><br />'; echo $emailBody; echo '<br /><br />'; echo '<input name = "send" type = "submit" value = "Enviar Emails" />'; echo '</form>'; } else { echo "Foram enviados " . $percentage_formated . "&#37; dos emails. " . $getUser_num_accessed . " acessaram o site, bonificação de R&#36; " . $money_formated . " para o Claudius Ibn."; } ?> <?php include('config.php'); include('class.phpmailer.php'); include('email.php'); echo 'Os emails estao sendo enviados, voce pode sair do site que o processo continuara mesmo assim.'; // Get users info $getUser_sql_not_sent = "SELECT * FROM emails WHERE sent = '0'"; $getUser_not_sent = mysql_query($getUser_sql_not_sent); $getUser_num_not_sent = mysql_num_rows($getUser_not_sent); $mail = new PHPMailer(); while ($row = mysql_fetch_array($getUser_not_sent)) { // Get the current user's email $emailUser = $row['email']; // Define mail object and mail parameters $mail -> From = 'campainha@ibnshare.com'; $mail -> FromName = 'Campainha'; $mail -> AddAddress($emailUser); $mail -> Subject = $emailSubject; $mail -> Body = $emailBody; // Send and verify if(!$mail -> Send()) { echo 'Erro: '. $mail -> ErrorInfo; } else { mysql_query("UPDATE emails SET sent = '1' WHERE email = '$emailUser'"); } sleep(30); } ?>
  7. Why the button "Enviar Emails" is not working? --> http://www.ibnshare.com/email/ (login: 123abc password: 123abc) echo '<form action = "send.php" method = "post">'; echo '<strong>Assunto do Email</strong><br />'; echo $emailSubject; echo '<br />'; echo '<strong>Corpo do Email</strong><br />'; echo $emailBody; echo '<br /><br />'; echo '<input name = "send" type = "button" value = "Enviar Emails" />'; echo '</form>';
  8. With this script: <?php $i=1; while($i<=5) { echo "The number is " . $i . "<br />"; $i++; sleep(3); } ?> I get: How can I make this dynamic. For example: First it would get: After 3 seconds... After 3 seconds... .......
  9. I made some changes on the script. <?php require_once('../includes/link.php'); $query = "SELECT * FROM emails"; $result = mysql_query($query); while($row = mysql_fetch_array($result)) { mail("$row['email']", "Teste - Enviar Emails", "Teste - Enviar Emails", "From: Teste - Enviar Emails"); sleep(3); } ?> But is giving Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING on mail("$row['email']", "Teste - Enviar Emails", "Teste - Enviar Emails", "From: Teste - Enviar Emails");
  10. Using just this <?php session_start(); require_once('../includes/link.php'); $errmsg_arr = array(); $errflag = false; echo "$_SESSION['SESS_EMAIL]"; ?> I got the same error Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/ibn/public_html/emailbomber/actions/sendemails.php on line 8
  11. The error persist Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/ibn/public_html/emailbomber/actions/sendemails.php on line 8 <?php session_start(); require_once('../includes/link.php'); $errmsg_arr = array(); $errflag = false; mail("$_SESSION['SESS_EMAIL']", "Teste - Enviar Emails", "Olá, ".$_SESSION['SESS_NAME']."\n\nTeste - Enviar Emails, From Teste"); $errmsg_arr[] = 'Os email serao enviados dentro de no maximo 48 horas.'; $errflag = true; $_SESSION['ERRMSG_ARR'] = $errmsg_arr; session_write_close(); header("location: ../users/user/sendemails.php"); ?>
  12. Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/ibn/public_html/emailbomber/actions/sendemails.php on line 8 <?php session_start(); require_once('../includes/link.php'); $errmsg_arr = array(); $errflag = false; mail("$_SESSION['SESS_EMAIL']", "Teste - Enviar Emails", "Olá, ".$_SESSION['SESS_NAME']."\n\nTeste - Enviar Emails, "From Teste"); $errmsg_arr[] = 'Os email serao enviados dentro de no maximo 48 horas.'; $errflag = true; $_SESSION['ERRMSG_ARR'] = $errmsg_arr; session_write_close(); header("location: ../users/user/sendemails.php"); ?>
  13. I know this should be made with ajax, but i have no idea from where start. I'd like to show the option "Escola" only if the option "Administrador" or "Moderador" be selected in the option "Status". How can i do that? <?php session_start(); require_once('includes/auth.php'); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Registrar Usuario</title> <link rel="stylesheet" href="../../css/styles.css" type="text/css"> </head> <body> <h1>Registrar Usuario</h1> <?php include("includes/header.php"); ?> <p>Uma senha sera gerada e enviada para o email do usuario.</p> <form id="loginForm" name="loginForm" method="post" action="../../actions/sadmin_register_user.php"> <table width="300" border="0" align="left" cellpadding="2" cellspacing="0"> <tr> <th>Status</th> <td> <select name="school" id="school" > "; <option value="1">Super Administrador</option> <option value="2">Super Moderador</option> <option value="3">Administrador</option> <option value="4">Moderador</option> </select> </td> </tr> <tr> <th>Escola</th> <td> <?php require_once('../../includes/link.php'); $link = mysql_connect(DB_HOST, DB_USER, DB_PASSWORD); $query = "SELECT * FROM schools"; $result = mysql_query($query); echo "<select name=\"school\" id=\"school\" > "; while($row = mysql_fetch_array($result)) { echo "<option value=\"" . $row['id'] . "\">" . $row['name'] . "</option>"; } echo "</select>"; ?> </td> </tr> <tr> <th>Nome Completo</th> <td><input name="name" type="text" class="textfield" id="name" /></td> </tr> <tr> <th>Email</th> <td width="168"><input name="email" type="text" class="textfield" id="email" /></td> </tr> <tr> <th>Confirmar Email</th> <td><input name="cemail" type="text" class="textfield" id="cemail" /></td> </tr> <tr> <td> </td> <td><input type="submit" name="Submit" value="Registrar" /></td> </tr> </table> </form> </body> </html>
×
×
  • 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.