first sorry for my english I have array will used by function
-
Upload text file and every line will be element in array
$fh = fopen("upload/".'1.txt','r'); $conn = array(); while ($line = fgets($fh)) { $conn[] = $line; } fclose($fh); $wbs->SendBulk($conn, "hello world");
-
Go To Function
public function SendBulk($targets, $message) { echo "Sending " . count($targets) . " bulk messages...<br />"; foreach($targets as $target) { $this->wa->sendPresenceSubscription($target); $this->wa->pollMessages(); $this->wa->sendMessageComposing($target); sleep(55); $this->wa->pollMessages(); $this->wa->sendMessagePaused($target); static::$sendLock = true; echo "Sending message from " . $this->username . " to $target... "; $this->wa->sendMessage($target, $message); // Orginal while(static::$sendLock) { //wait for server receipt sleep(55); } }
My Problem If I have in text file 2 or more element in array will send for the last element a message but If i make array like this
$conn= array("565684898", "484849815", "484897987", "515498798");
It work for all elements Please Help