You will want to look through the string functions for php to see which will do what you want with your message string.
http://php.net/manual/en/ref.strings.php
Perhaps first count 200 characters and then look for the first "<br />" after that. That is where you would want to insert the ad and then put the string back together. It's not going to be an easy one-line piece of code.