getMessage()}\n", FILE_APPEND | LOCK_EX ); } } elseif ($notification['Type'] == 'Notification') { # Handle Elastic Transcoder notifications. In this example, we write them to # $tmp_path/. $job_status = json_decode($notification['Message'], true); file_put_contents( "$tmp_path/{$job_status['jobId']}", json_encode($job_status) . "\n", FILE_APPEND | LOCK_EX ); } else { # Write unknown notifications out to disk. file_put_contents("$tmp_path/unknown_notification.txt", "$data\n", FILE_APPEND | LOCK_EX); } // snippet-end:[elastictranscoder.php.create_job_status_notification_handler.import]