So I've started working on this twitter script that targets users who tweet about my website, and I want to set up this up with cron job to thank them for doing so. This is how it works:

1. Parses usernames from search page (15 in total)
2. Loops through all 15 user names and if its found in the twitter.txt file
it will stop the script
3. If the user name is not found in the twitter.txt file it will write
the user name to the twitter.txt file and then send a tweet to that user. (twitter.txt file helps to prevent sending of duplicate tweets to the same user)

So my issue is that this script currently sends out 15 tweets in one sitting and this would be considered spam. So I need help to be able to consolidate the user names in to 3 tweets. So each tweet will contain 5 user names. You will seet at the bottom of the script where i have the variables to store the usernames for the tweets.

```
//cURL
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, "http://search.twitter.com/search.atom?q=MYWEBSITE");
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
$twitter = curl_exec($curl);
curl_close($curl); 

//search html source page for user names
preg_match_all('/\<uri\>http\:\/\/twitter\.com\/(.*?)\<\/uri\>/', $twitter, $usernames);

//open the twitter text file and prepare for writing
$twitter = fopen("twitter.txt", "a");

//contents of the twitter text file (holds the twitter user names)
$contents = file_get_contents("twitter.txt");

//loop through each user name
foreach($usernames[1] as $username) { 
    //if user name is found in the twitter text file it states "Found" and script stops
    if (strpos($contents, $username) !== FALSE) {
        echo $username . " - <font color=\"red\">Found</font><br />";
    //if user name is not found in the twitter text file it records the user name and tweets
    } else {
        //write to twitter text file
        fwrite($twitter, $username."\r\n");

        //shows what user names were recorded
        echo $username . "<br />";

        //user names for tweets
        //this is where i need help dividing the usernames into these variables
        $usernames_set_one = "";
        $usernames_set_two = "";
        $usernames_set_three = "";

        //tweet
        $connection = new TwitterOAuth(CONSUMER_KEY, CONSUMER_SECRET, OAUTH_TOKEN, OAUTH_SECRET);
        $content = $connection->get('account/verify_credentials');

        //twitter message
        $connection->post('statuses/update', array('status' => $usernames_set_one . ' thank you for tweeting about my website.' ));
        $connection->post('statuses/update', array('status' => $usernames_set_two . ' thank you for tweeting about my website.' ));
        $connection->post('statuses/update', array('status' => $usernames_set_three . ' thank you for tweeting about my website.' ));

        return $connection;
    }

}

//close the twitter text file no further writing
fclose($twitter);

```