"pepa", "password" => "zdepa"); $cc = curl_init("https://www.odorik.cz/api/v1/sms"); curl_setopt($cc, CURLOPT_RETURNTRANSFER, true); for ($i = 0; $row = fgetcsv($handle ); ++$i) { // Do something will $row array $sms = array( "sender" => "Odorik.cz", "recipient" => $row[0], "message" => $row[1]); curl_setopt($cc, CURLOPT_POSTFIELDS, $authentication + $sms); echo "odesilam sms na číslo $row[0] s textem $row[1] ". PHP_EOL ; $response = curl_exec($cc); if (strstr($response, "successfully_sent") == false) { echo "SMS zpravu se nepodarilo odeslat. Duvod: " . $response; } } fclose($handle); curl_close($cc); ?> ?>