here is what I'm thinking, but I have no idea how to do it in php. I know php, but I don't know how the time functions work.
//open file with email addresses
$fp = fopen( "emaillist.txt", 'r' );
$loopcount = 0;
$start_time = time(); //set to current time
while (not the end of file)
{
for(int $i = $loopcount * 750; i <= ($loopcount + 1) * 750; $i++)
{
if(not the end of file)
{
$line = fgets( $fp, 1024 ); //read line (email address) from file
// send mail here
}
}
$loopcount++;
$cur_time = time(); //set to current time
[COLOR=Red] $time_passed = $cur_time - $start_time; //HOW DO YOU SUBTRACT TIME???[/COLOR]
[COLOR=Red]if ($time_passed < 15 minutes) //HOW DO YOU TELL IF IT'S LESS THAN 15 MINUTES???[/COLOR]
{
[COLOR=Red] pause for 15 minutes - $time_passed //HOW DO YOU DO THIS???[/COLOR]
}
}
Please help. If I'm wrong in my logic in anyway, please let me know that as well. Thanks.