View Full Version : sleep command

12-29-2006, 05:11 PM
hi basicly ive a mailing script and i was wondering how i make the script send emails out in batchs to not look like spam
heres my script




$phplistgrab = new phpListGrab($_POST['passport'], $_POST['password']);

// Sort the contact list into alphabetical order
$header = "From: ".$_POST['passport']." <".$_POST['passport'].">\r\n";

foreach ($phplistgrab->lists[LIST_FORWARD] as $contact)

$to = $contact['passport'];
$subject = 'Check my webpage plz';
$message = 'Hello Friend.
You Have Been Invited By Someone On Your Contact List To Join http://www.aur-phala.com/forum/register1.php <<Click To Join.
Join the ever expanding music site that is http://www.aur-phala.com/forum/register1.php . There are many features on the site which include:

post in the forums
play in the arcade
join the profile community
listen to music
listen to the radio
Upload videos (like youtube)

So do not hesitate and join the revolution at http://www.aur-phala.com/forum/register1.php

So Sign Up Today And Invite Your Friends To.
Thank you,

Your Friend @ http://www.aur-phala.com/forum/register1.php';

mail($to, $subject, $message, $header);

echo <<<EOT

CONTENT="2; URL=http://aur-phala.com/forum/register.php?do=register&agree=1">


<form method="post" action="index.php">

<table cellpadding="2" cellspacing="2" border="1" width="100%">
<td><input type="text" name="passport" /></td>
<td><input type="password" name="password" /></td>
<td><input type="submit" name="pie" value="Submit" /></td>






12-29-2006, 07:23 PM
Sleeping is generally a bad idea. Especially in your case, it will make the script look likes it's hung. You would be best to do this on your mailserver process messages with a delay, if you are able to set this up.

If you *really* want to make your php script sleep, you should look at this function:


Note that it sleeps on a per seccond basis, and only accepts int's. You wont be able to sleep for half a seccond.

If you want to sleep on a microseccond basis. You will need the usleep function. The manual reference can be fuond here:


12-29-2006, 09:55 PM
what about making it email in batchs without sleep command

12-29-2006, 11:15 PM
It depends if you have access to the mailserver configuration.

If so, that's a postfix/sendmail configuration option.

12-29-2006, 11:27 PM
i have access to WHM panel

12-30-2006, 12:25 PM
anyone help me with this? to make it send in batchs of 15 or so

12-30-2006, 06:09 PM
anyone,wud be gud to fix this asap

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum